[Bug c++/89336] internal compiler error when compiling a constexpr function

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 13 16:07:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89336

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The current ICE started with r267253:

89336.C: In function ‘int main()’:
89336.C:16:20: internal compiler error: Segmentation fault
0x13ae0c0 crash_signal
        ../../gcc/toplev.c:326
0x89a0e1 initialized_type
        ../../gcc/cp/constexpr.c:2830
0x89a2eb init_subob_ctx
        ../../gcc/cp/constexpr.c:2864
0x89a8dc cxx_eval_bare_aggregate
        ../../gcc/cp/constexpr.c:2951
0x8a205e cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:4692
0x89a94d cxx_eval_bare_aggregate
        ../../gcc/cp/constexpr.c:2956
0x8a205e cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:4692
0x8a38ea cxx_eval_outermost_constant_expr
        ../../gcc/cp/constexpr.c:5077
0x8a454c maybe_constant_value(tree_node*, tree_node*, bool)
        ../../gcc/cp/constexpr.c:5309
0x8c2776 cp_fully_fold(tree_node*)
        ../../gcc/cp/cp-gimplify.c:2161
0xb73a19 split_nonconstant_init(tree_node*, tree_node*)
        ../../gcc/cp/typeck2.c:753
0xb7421d store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ../../gcc/cp/typeck2.c:876
0x9041c4 check_initializer
        ../../gcc/cp/decl.c:6491
0x90766d cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/cp/decl.c:7167
0xa0faa8 cp_parser_init_declarator
        ../../gcc/cp/parser.c:20327
0xa02a14 cp_parser_simple_declaration
        ../../gcc/cp/parser.c:13414
0xa025a5 cp_parser_block_declaration
        ../../gcc/cp/parser.c:13239
0xa01a00 cp_parser_declaration_statement
        ../../gcc/cp/parser.c:12844
0x9fdb1a cp_parser_statement
        ../../gcc/cp/parser.c:11169
0x9fe815 cp_parser_statement_seq_opt
        ../../gcc/cp/parser.c:11531
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

but before that it ICEd also:

89336.C: In function ‘int main()’:
89336.C:16:20: internal compiler error: Segmentation fault
0x13ae0a2 crash_signal
        ../../gcc/toplev.c:326
0xb7348a split_nonconstant_init_1
        ../../gcc/cp/typeck2.c:641
0xb7350c split_nonconstant_init_1
        ../../gcc/cp/typeck2.c:652
0xb73a1b split_nonconstant_init(tree_node*, tree_node*)
        ../../gcc/cp/typeck2.c:755
0xb741ff store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ../../gcc/cp/typeck2.c:876
0x9041a6 check_initializer
        ../../gcc/cp/decl.c:6491
0x90764f cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/cp/decl.c:7167
0xa0fa8a cp_parser_init_declarator
        ../../gcc/cp/parser.c:20327
0xa029f6 cp_parser_simple_declaration
        ../../gcc/cp/parser.c:13414
0xa02587 cp_parser_block_declaration
        ../../gcc/cp/parser.c:13239
0xa019e2 cp_parser_declaration_statement
        ../../gcc/cp/parser.c:12844
0x9fdafc cp_parser_statement
        ../../gcc/cp/parser.c:11169
0x9fe7f7 cp_parser_statement_seq_opt
        ../../gcc/cp/parser.c:11531
0x9fe6ed cp_parser_compound_statement
        ../../gcc/cp/parser.c:11485
0xa13879 cp_parser_function_body
        ../../gcc/cp/parser.c:22405
0xa13a3d cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/cp/parser.c:22442
0xa1d7ec cp_parser_function_definition_after_declarator
        ../../gcc/cp/parser.c:27495
0xa1d619 cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/cp/parser.c:27411
0xa0f2a1 cp_parser_init_declarator
        ../../gcc/cp/parser.c:20097
0xa029f6 cp_parser_simple_declaration
        ../../gcc/cp/parser.c:13414
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


More information about the Gcc-bugs mailing list