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

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).