public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "johelegp at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106430] [modules] ICE on function result of imported type with user-declared constexpr SMF Date: Wed, 27 Jul 2022 22:34:10 +0000 [thread overview] Message-ID: <bug-106430-4-9ej7OPQvMs@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106430-4@http.gcc.gnu.org/bugzilla/> 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. ```
next prev parent reply other threads:[~2022-07-27 22:34 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 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 [this message] 2022-10-14 12:54 ` [Bug c++/106430] [modules] ICE on function result of imported type with user-declared constexpr SMF ppalka at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-106430-4-9ej7OPQvMs@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).