[Bug c++/59838] New: ICE with an enum using an incomplete type
ville.voutilainen at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jan 16 07:01:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59838
Bug ID: 59838
Summary: ICE with an enum using an incomplete type
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ville.voutilainen at gmail dot com
Very simple test:
enum E { a, b = true ? 1 : ((E)a, 0) };
enumcrash.cpp:1:32: internal compiler error: Segmentation fault
enum E { a, b = true ? 1 : ((E)a, 0) };
^
0xb46faf crash_signal
../../gcc/toplev.c:336
0xd65d54 int_fits_type_p(tree_node const*, tree_node const*)
../../gcc/tree.c:8566
0x69b53b ocp_convert(tree_node*, tree_node*, int, int, int)
../../gcc/cp/cvt.c:756
0x6992e7 cp_build_c_cast(tree_node*, tree_node*, int)
../../gcc/cp/typeck.c:7130
0x6565ef cp_parser_binary_expression
../../gcc/cp/parser.c:7874
0x656ae1 cp_parser_assignment_expression
../../gcc/cp/parser.c:8112
0x658a74 cp_parser_expression
../../gcc/cp/parser.c:8274
0x64fe0f cp_parser_primary_expression
../../gcc/cp/parser.c:4279
0x65288a cp_parser_postfix_expression
../../gcc/cp/parser.c:5969
0x655948 cp_parser_unary_expression
../../gcc/cp/parser.c:7170
0x6565ef cp_parser_binary_expression
../../gcc/cp/parser.c:7874
0x656ae1 cp_parser_assignment_expression
../../gcc/cp/parser.c:8112
0x656dc3 cp_parser_assignment_expression
../../gcc/cp/parser.c:8162
0x656dc3 cp_parser_question_colon_clause
../../gcc/cp/parser.c:8073
0x656dc3 cp_parser_assignment_expression
../../gcc/cp/parser.c:8116
0x656f43 cp_parser_assignment_expression
../../gcc/cp/parser.c:8162
0x656f43 cp_parser_constant_expression
../../gcc/cp/parser.c:8372
0x65fe12 cp_parser_enumerator_definition
../../gcc/cp/parser.c:15634
0x65fe12 cp_parser_enumerator_list
../../gcc/cp/parser.c:15581
0x65fe12 cp_parser_enum_specifier
../../gcc/cp/parser.c:15507
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
More information about the Gcc-bugs
mailing list