https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79822
Bug ID: 79822 Summary: [7 Regression] ICE with void statement expression Product: gcc Version: unknown Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org Target Milestone: --- The following invalid code snippet triggers an ICE on trunk: ============================== bool foo() { return ({ ; }) && false; } ============================== bug.cc: In function 'bool foo()': bug.cc:3:18: internal compiler error: Segmentation fault return ({ ; }) && false; ^~ 0xd5fe0f crash_signal ../../gcc/gcc/toplev.c:337 0x836879 reduced_constant_expression_p(tree_node*) ../../gcc/gcc/cp/constexpr.c:1708 0x8369d4 verify_constant ../../gcc/gcc/cp/constexpr.c:1741 0x8425f7 cxx_eval_outermost_constant_expr ../../gcc/gcc/cp/constexpr.c:4618 0x845906 maybe_constant_value(tree_node*, tree_node*) ../../gcc/gcc/cp/constexpr.c:4830 0x8206aa cp_fully_fold(tree_node*) ../../gcc/gcc/cp/cp-gimplify.c:1963 0x727267 cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:8936 0x7276c4 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:9168 0x72b3d8 cp_parser_expression ../../gcc/gcc/cp/parser.c:9337 0x7199aa cp_parser_jump_statement ../../gcc/gcc/cp/parser.c:12147 0x7199aa cp_parser_statement ../../gcc/gcc/cp/parser.c:10581 0x71a25d cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:11027 0x71a32f cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:10981 0x71a4c3 cp_parser_function_body ../../gcc/gcc/cp/parser.c:21428 0x71a4c3 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:21466 0x71ad41 cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:26253 0x71ba2d cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:26165 0x71ba2d cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:19155 0x73f6cc cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:12773 0x740475 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:12598 Please submit a full bug report, [etc.]