public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102161] New: Compiler crashes when taking the address of an enum
@ 2021-09-01 16:07 meinaccountnr2 at web dot de
2021-09-01 20:29 ` [Bug c++/102161] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: meinaccountnr2 at web dot de @ 2021-09-01 16:07 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/102161] Compiler crashes when taking the address of an enum
2021-09-01 16:07 [Bug c++/102161] New: Compiler crashes when taking the address of an enum meinaccountnr2 at web dot de
@ 2021-09-01 20:29 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-01 20:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102161
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-09-01
Keywords| |ice-on-invalid-code
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-01 20:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01 16:07 [Bug c++/102161] New: Compiler crashes when taking the address of an enum meinaccountnr2 at web dot de
2021-09-01 20:29 ` [Bug c++/102161] " pinskia 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).