public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106430] New: [modules] ICE on function result of imported type with user-declared constexpr destructor
@ 2022-07-24 23:06 johelegp at gmail dot com
2022-07-27 22:34 ` [Bug c++/106430] [modules] ICE on function result of imported type with user-declared constexpr SMF johelegp at gmail dot com
2022-10-14 12:54 ` ppalka at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: johelegp at gmail dot com @ 2022-07-24 23:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106430
Bug ID: 106430
Summary: [modules] ICE on function result of imported type with
user-declared constexpr destructor
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: johelegp at gmail dot com
CC: johelegp at gmail dot com
Target Milestone: ---
See https://godbolt.org/z/Tr575rbj9.
mod.cpp:
```C++
export module mod;
struct X {
bool b = true;
constexpr ~X() { }
};
export constexpr X f() { return {}; }
```
test.cpp:
```C++
import mod;
static_assert(f().b);
int main() { }
```
Output:
```
test.cpp:2:21: in 'constexpr' expansion of 'f@mod()()'
test.cpp:2:21: internal compiler error: in cxx_eval_call_expression, at
cp/constexpr.cc:2850
2 | static_assert(f().b);
| ^
0x23010ce internal_error(char const*, ...)
???:0
0xa8f3bc fancy_abort(char const*, int, char const*)
???:0
0xaf4d0c maybe_constant_value(tree_node*, tree_node*, bool)
???:0
0xce57cf finish_static_assert(tree_node*, tree_node*, unsigned int, bool, bool)
???:0
0xc656d7 c_parse_file()
???:0
0xd9ec99 c_common_parse_file()
???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
```
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/106430] [modules] ICE on function result of imported type with user-declared constexpr SMF
2022-07-24 23:06 [Bug c++/106430] New: [modules] ICE on function result of imported type with user-declared constexpr destructor johelegp at gmail dot com
@ 2022-07-27 22:34 ` johelegp at gmail dot com
2022-10-14 12:54 ` ppalka at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: johelegp at gmail dot com @ 2022-07-27 22:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106430
Johel Ernesto Guerrero Peña <johelegp at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[modules] ICE on function |[modules] ICE on function
|result of imported type |result of imported type
|with user-declared |with user-declared
|constexpr destructor |constexpr SMF
--- Comment #1 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> ---
See https://godbolt.org/z/T8591z1nT with copy constructor:
`mod.cpp`:
```C++
export module mod;
export struct X {
bool b = true;
X() = default;
constexpr X(const X&) { }
};
export constexpr X id(X x) { return x; }
```
`test.cpp`:
```C++
import mod;
static_assert(id(X{}).b);
int main() { }
```
Output:
```
test.cpp:2:25: in 'constexpr' expansion of 'id@mod(X@mod)()'
test.cpp:2:25: internal compiler error: in cxx_eval_call_expression, at
cp/constexpr.cc:2850
2 | static_assert(id(X{}).b);
| ^
0x230869e internal_error(char const*, ...)
???:0
0xa90716 fancy_abort(char const*, int, char const*)
???:0
0xaf60ac maybe_constant_value(tree_node*, tree_node*, bool)
???:0
0xce6baf finish_static_assert(tree_node*, tree_node*, unsigned int, bool, bool)
???:0
0xc66a77 c_parse_file()
???:0
0xda0269 c_common_parse_file()
???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
```
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/106430] [modules] ICE on function result of imported type with user-declared constexpr SMF
2022-07-24 23:06 [Bug c++/106430] New: [modules] ICE on function result of imported type with user-declared constexpr destructor johelegp at gmail dot com
2022-07-27 22:34 ` [Bug c++/106430] [modules] ICE on function result of imported type with user-declared constexpr SMF johelegp at gmail dot com
@ 2022-10-14 12:54 ` ppalka at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-10-14 12:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106430
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
dup of PR101449 I think
*** This bug has been marked as a duplicate of bug 101449 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-14 12:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-24 23:06 [Bug c++/106430] New: [modules] ICE on function result of imported type with user-declared constexpr destructor johelegp at gmail dot com
2022-07-27 22:34 ` [Bug c++/106430] [modules] ICE on function result of imported type with user-declared constexpr SMF johelegp at gmail dot com
2022-10-14 12:54 ` ppalka at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).