https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79657
Bug ID: 79657 Summary: ICE on invalid c++ code in finish_underlying_type cp/semantics.c:3849 Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- Adopted from clang: $ g++ /home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaCXX/underlying_type.cp ... /home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaCXX/underlying_type.cpp:53:29: internal compiler error: Segmentation fault a = (__underlying_type(E)){} ^ 0x11cc42a crash_signal ../../gcc/toplev.c:337 0x80d55e tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) ../../gcc/tree.h:3186 0xa5a5aa finish_underlying_type(tree_node*) ../../gcc/cp/semantics.c:3849 0x996185 cp_parser_trait_expr ../../gcc/cp/parser.c:9747 0x9a36d6 cp_parser_simple_type_specifier ../../gcc/cp/parser.c:16753 0x9a304b cp_parser_type_specifier ../../gcc/cp/parser.c:16519 0x9aba9b cp_parser_type_specifier_seq ../../gcc/cp/parser.c:20804 0x9ab5cd cp_parser_type_id_1 ../../gcc/cp/parser.c:20647 0x9ab915 cp_parser_type_id ../../gcc/cp/parser.c:20715 0x98fc43 cp_parser_postfix_expression ../../gcc/cp/parser.c:6728 0x9935b1 cp_parser_unary_expression ../../gcc/cp/parser.c:8125 0x9943e3 cp_parser_cast_expression ../../gcc/cp/parser.c:8802 0x9944d3 cp_parser_binary_expression ../../gcc/cp/parser.c:8903 0x9951ee cp_parser_assignment_expression ../../gcc/cp/parser.c:9190 0x995949 cp_parser_constant_expression ../../gcc/cp/parser.c:9460 0x9a6277 cp_parser_enumerator_definition ../../gcc/cp/parser.c:18081 0x9a6133 cp_parser_enumerator_list ../../gcc/cp/parser.c:18021 0x9a5ed0 cp_parser_enum_specifier ../../gcc/cp/parser.c:17948 0x9a2e5b cp_parser_type_specifier ../../gcc/cp/parser.c:16413 0x99dd17 cp_parser_decl_specifier_seq ../../gcc/cp/parser.c:13352