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++/105044] [modules] ICE in comptypes, at cp/typeck.cc:1531 Date: Sun, 03 Jul 2022 21:25:23 +0000 [thread overview] Message-ID: <bug-105044-4-sBMOeZNEeQ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105044-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105044 Johel Ernesto Guerrero Peña <johelegp at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[modules] ICE in comptypes, |[modules] ICE in comptypes, |at cp/typeck.c:1529 |at cp/typeck.cc:1531 --- Comment #2 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> --- Another simpler reproducer from another use-case: https://godbolt.org/z/jroqv6Kzq. `mod.cpp`: ```C++ export module mod; export template<auto> struct constant { }; export template<class> struct is_constant { }; struct monostate { }; inline constexpr constant<monostate{}> c1{}; ``` `test.cpp`: ```C++ import mod; is_constant<constant<0>> v; int main() { } ``` Output: ``` In module mod, imported at /app/test.cpp:1: mod.cpp: In instantiation of 'struct is_constant@mod<constant@mod<0> >': test.cpp:2:26: required from here mod.cpp:3:31: internal compiler error: in comptypes, at cp/typeck.cc:1531 3 | export template<class> struct is_constant { }; | ^~~~~~~~~~~ 0x2216469 internal_error(char const*, ...) ???:0 0x74b7d9 fancy_abort(char const*, int, char const*) ???:0 0xa90b66 comptypes(tree_node*, tree_node*, int) ???:0 0x833e5d complete_vars(tree_node*) ???:0 0x7ab99b finish_struct_1(tree_node*) ???:0 0xa13ed4 instantiate_class_template(tree_node*) ???:0 0x823818 start_decl_1(tree_node*, bool) ???:0 0x84b6a6 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ???:0 0x99555d c_parse_file() ???:0 0xb2bc61 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-03 21:25 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-24 10:53 [Bug c++/105044] New: [modules] ICE in comptypes, at cp/typeck.c:1529 johelegp at gmail dot com 2022-07-03 21:24 ` [Bug c++/105044] " johelegp at gmail dot com 2022-07-03 21:25 ` johelegp at gmail dot com [this message] 2022-07-04 3:28 ` [Bug c++/105044] [modules] ICE in comptypes, at cp/typeck.cc:1531 johelegp at gmail dot com 2022-10-18 15:10 ` 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-105044-4-sBMOeZNEeQ@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).