public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "meinaccountnr2 at web dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102161] New: Compiler crashes when taking the address of an enum Date: Wed, 01 Sep 2021 16:07:15 +0000 [thread overview] Message-ID: <bug-102161-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102161 Bug ID: 102161 Summary: Compiler crashes when taking the address of an enum Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: meinaccountnr2 at web dot de Target Milestone: --- The compiler crashes on this code: template<class> struct a {}; template<a entr> struct b {}; struct s{ enum enu {a}; }; using T = b<{&s::enu}>; gcc 10.1 https://godbolt.org/z/r64EhbaGr gcc 10.2 https://godbolt.org/z/cT9PE9h4o gcc 10.3 https://godbolt.org/z/Y88jaEMrd gcc 11.1 https://godbolt.org/z/KfsEhqaM5 gcc 11.2 https://godbolt.org/z/T797EWoE5 gcc trunk https://godbolt.org/z/3Mdo67M64 gcc commit 2cc65fcbd470de8240f64317629a60fab879dfc5 stacktrace: /home/raphael/repos/cpp/source/gcc_kill_value_param_1.cpp:4:22: internal compiler error: in coerce_template_parms, at cp/pt.c:9060 4 | using T = b<{&s::enu}>; | ^ 0x68201a coerce_template_parms /home/raphael/repos/build-gcc/gcc/gcc/cp/pt.c:9060 0x831817 lookup_template_class_1 /home/raphael/repos/build-gcc/gcc/gcc/cp/pt.c:9843 0x832a6c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) /home/raphael/repos/build-gcc/gcc/gcc/cp/pt.c:10230 0x8579cd finish_template_type(tree_node*, tree_node*, int) /home/raphael/repos/build-gcc/gcc/gcc/cp/semantics.c:3639 0x7f2f9f cp_parser_template_id /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:18151 0x7f31eb cp_parser_class_name /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:25463 0x7eb44a cp_parser_qualifying_entity /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:7046 0x7eb44a cp_parser_nested_name_specifier_opt /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:6728 0x8011c5 cp_parser_simple_type_specifier /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:19561 0x7e028d cp_parser_type_specifier /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:19220 0x7f0763 cp_parser_type_specifier_seq /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:24125 0x7eeb34 cp_parser_type_id_1 /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:23925 0x7f14b8 cp_parser_type_id /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:24021 0x7f14b8 cp_parser_alias_declaration /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:21551 0x80ec85 cp_parser_declaration /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:14795 0x80f5dc cp_parser_toplevel_declaration /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:14816 0x80f5dc cp_parser_translation_unit /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:4978 0x80f5dc c_parse_file() /home/raphael/repos/build-gcc/gcc/gcc/cp/parser.c:46789 0x8e52fd c_common_parse_file() /home/raphael/repos/build-gcc/gcc/gcc/c-family/c-opts.c:1223
next reply other threads:[~2021-09-01 16:07 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-01 16:07 meinaccountnr2 at web dot de [this message] 2021-09-01 20:29 ` [Bug c++/102161] " pinskia 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-102161-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).