[Bug c++/105245] New: [10/11/12 Regression] ICE in clear_no_implicit_zero, in cp/constexpr.cc:1892

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Tue Apr 12 17:25:44 GMT 2022


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

            Bug ID: 105245
           Summary: [10/11/12 Regression] ICE in clear_no_implicit_zero,
                    in cp/constexpr.cc:1892
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started between 20210411 and 20210418,
with option -fno-elide-constructors plus -std=c++11 or -std=c++14
and file g++.dg/cpp1y/constexpr-empty2.C :


$ g++-9           -c constexpr-empty2.C -fno-elide-constructors -std=c++14
$ g++-12-20220410 -c constexpr-empty2.C -fno-elide-constructors -std=c++17
$
$ g++-12-20220410 -c constexpr-empty2.C -fno-elide-constructors -std=c++14
constexpr-empty2.C: In function 'constexpr int f()':
constexpr-empty2.C:22:10:   in 'constexpr' expansion of 'b2.C::C(b1)'
constexpr-empty2.C:22:10: internal compiler error: Segmentation fault
   22 |   C b2{b1};
      |          ^
0xda8c2f crash_signal
        ../../gcc/toplev.cc:322
0x6f902b clear_no_implicit_zero
        ../../gcc/cp/constexpr.cc:1892
0x6ff9db cxx_eval_call_expression
        ../../gcc/cp/constexpr.cc:2992
0x702388 cxx_eval_constant_expression
        ../../gcc/cp/constexpr.cc:6713
0x705043 cxx_eval_outermost_constant_expr
        ../../gcc/cp/constexpr.cc:7822
0x70843f maybe_constant_init_1
        ../../gcc/cp/constexpr.cc:8285
0x76f8d5 expand_default_init
        ../../gcc/cp/init.cc:2204
0x76f8d5 expand_aggr_init_1
        ../../gcc/cp/init.cc:2309
0x771489 build_aggr_init(tree_node*, tree_node*, int, int)
        ../../gcc/cp/init.cc:2029
0x74f02d build_aggr_init_full_exprs
        ../../gcc/cp/decl.cc:7183
0x74f02d check_initializer
        ../../gcc/cp/decl.cc:7348
0x750360 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/cp/decl.cc:8379
0x8133ef cp_parser_init_declarator
        ../../gcc/cp/parser.cc:22821
0x7f1502 cp_parser_simple_declaration
        ../../gcc/cp/parser.cc:15280
0x7f2da9 cp_parser_declaration_statement
        ../../gcc/cp/parser.cc:14361
0x7f33ab cp_parser_statement
        ../../gcc/cp/parser.cc:12446
0x7f42f4 cp_parser_statement_seq_opt
        ../../gcc/cp/parser.cc:12850
0x7f43af cp_parser_compound_statement
        ../../gcc/cp/parser.cc:12802
0x812578 cp_parser_function_body
        ../../gcc/cp/parser.cc:25060
0x812578 cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/cp/parser.cc:25111


More information about the Gcc-bugs mailing list