https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89705
Bug ID: 89705
Summary: ICE in convert_like_real, at cp/call.c:7334
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Affects versions down to gcc-5 (gcc-5 with -std=c++14).
(afaict gcc-4.9 -std=c++14, clang7, icc19 accepts it).
Compiles without "const".
$ cat z1.cc
enum e { a };
struct s { operator const e(); };
e && b = s();
$ g++-9-20190310 -c z1.cc
z1.cc:3:12: internal compiler error: in convert_like_real, at cp/call.c:7334
3 | e && b = s();
| ^
0x6357e2 convert_like_real
../../gcc/cp/call.c:7334
0x640ed3 initialize_reference(tree_node*, tree_node*, int, int)
../../gcc/cp/call.c:11480
0x6b76e7 grok_reference_init
../../gcc/cp/decl.c:5401
0x6b76e7 check_initializer
../../gcc/cp/decl.c:6412
0x6dff6c cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/cp/decl.c:7196
0x7a5d25 cp_parser_init_declarator
../../gcc/cp/parser.c:20468
0x786426 cp_parser_simple_declaration
../../gcc/cp/parser.c:13492
0x7adf44 cp_parser_declaration
../../gcc/cp/parser.c:13189
0x7ae70c cp_parser_translation_unit
../../gcc/cp/parser.c:4698
0x7ae70c c_parse_file()
../../gcc/cp/parser.c:41114
0x90a270 c_common_parse_file()
../../gcc/c-family/c-opts.c:1155