https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84192
Bug ID: 84192 Summary: [7/8 Regression] ICE with 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 since GCC 7.1.0: ======================================== bool foo() { return ({ return true; }) && false; } ======================================== bug.cc: In function 'bool foo()': bug.cc:3:29: internal compiler error: Segmentation fault return ({ return true; }) && false; ^~ 0xd721af crash_signal ../../gcc-7.1.0/gcc/toplev.c:337 0x847125 cxx_eval_constant_expression ../../gcc-7.1.0/gcc/cp/constexpr.c:4103 0x84d67e cxx_eval_outermost_constant_expr ../../gcc-7.1.0/gcc/cp/constexpr.c:4640 0x850976 maybe_constant_value(tree_node*, tree_node*) ../../gcc-7.1.0/gcc/cp/constexpr.c:4855 0x82b54a cp_fully_fold(tree_node*) ../../gcc-7.1.0/gcc/cp/cp-gimplify.c:1976 0x72eb47 cp_parser_binary_expression ../../gcc-7.1.0/gcc/cp/parser.c:8937 0x72efb4 cp_parser_assignment_expression ../../gcc-7.1.0/gcc/cp/parser.c:9169 0x732df8 cp_parser_expression ../../gcc-7.1.0/gcc/cp/parser.c:9338 0x72116d cp_parser_jump_statement ../../gcc-7.1.0/gcc/cp/parser.c:12151 0x72116d cp_parser_statement ../../gcc-7.1.0/gcc/cp/parser.c:10585 0x721a0d cp_parser_statement_seq_opt ../../gcc-7.1.0/gcc/cp/parser.c:11031 0x721adf cp_parser_compound_statement ../../gcc-7.1.0/gcc/cp/parser.c:10985 0x722248 cp_parser_function_body ../../gcc-7.1.0/gcc/cp/parser.c:21432 0x722248 cp_parser_ctor_initializer_opt_and_function_body ../../gcc-7.1.0/gcc/cp/parser.c:21470 0x722511 cp_parser_function_definition_after_declarator ../../gcc-7.1.0/gcc/cp/parser.c:26261 0x7231fd cp_parser_function_definition_from_specifiers_and_declarator ../../gcc-7.1.0/gcc/cp/parser.c:26173 0x7231fd cp_parser_init_declarator ../../gcc-7.1.0/gcc/cp/parser.c:19159 0x74718c cp_parser_simple_declaration ../../gcc-7.1.0/gcc/cp/parser.c:12777 0x747f25 cp_parser_block_declaration ../../gcc-7.1.0/gcc/cp/parser.c:12602 0x74d3d4 cp_parser_declaration ../../gcc-7.1.0/gcc/cp/parser.c:12500 Please submit a full bug report, [etc.]