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++/103339] New: [modules] ICE in exporting module on use of outside specialization Date: Sat, 20 Nov 2021 06:36:15 +0000 [thread overview] Message-ID: <bug-103339-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103339 Bug ID: 103339 Summary: [modules] ICE in exporting module on use of outside specialization Product: gcc Version: 12.0 Status: UNCONFIRMED 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/onW6h5vej. mod.cpp: ```C++ export module mod; export template<class T> struct trait { }; export template<class> concept C = true; template<class T> concept has_trait = C<trait<T>>; ``` test.cpp: ```C++ import mod; template<C T> struct trait<T> { }; ``` Output: ``` test.cpp:2:31: internal compiler error: in import_entity_index, at cp/module.cc:3953 2 | template<C T> struct trait<T> { }; | ^ 0x206aac9 internal_error(char const*, ...) ???:0 0x7d92db fancy_abort(char const*, int, char const*) ???:0 0x966072 module_may_redeclare(tree_node*) ???:0 0xaab517 begin_class_definition(tree_node*) ???:0 0xa0b065 c_parse_file() ???:0 0xb931d2 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. ``` Workaround: ```diff -template<class T> concept has_trait = C<trait<T>>; +template<class T> concept has_trait = C<trait<std::type_identity_t<T>>>; ``` As per the logic in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99631#c1, this isn't marked with any of the ice-* keywords.
next reply other threads:[~2021-11-20 6:36 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-20 6:36 johelegp at gmail dot com [this message] 2021-11-23 17:00 ` [Bug c++/103339] " johelegp at gmail dot com 2021-11-23 17:11 ` johelegp at gmail dot com 2021-11-23 18:15 ` johelegp at gmail dot com 2022-10-18 0:26 ` ppalka at gcc dot gnu.org 2022-10-18 0:30 ` johelegp at gmail dot com 2024-02-10 4:38 ` nshead 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-103339-4@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).