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

            Bug ID: 84703
           Summary: internal compiler error: in cxx_eval_bare_aggregate,
                    at cp/constexpr.c:2810
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vegard.nossum at gmail dot com
                CC: webrown.cpp at gmail dot com
  Target Milestone: ---

Input:

template<int x>
void a() {
  const int c({__builtin_FUNCTION()}, __builtin_LINE());
}

Output:

$ xgcc -x c++ -S -
<stdin>: In function 'void a()':
<stdin>:3:55: warning: list-initializer for non-class type must not be
parenthesized
<stdin>:3:55: error: expression list treated as compound expression in
initializer [-fpermissive]
<stdin>:3:55: internal compiler error: in cxx_eval_bare_aggregate, at
cp/constexpr.c:2810
0xa3ac67 cxx_eval_bare_aggregate
        /home/vegard/git/gcc/gcc/cp/constexpr.c:2810
0xa3ac67 cxx_eval_constant_expression
        /home/vegard/git/gcc/gcc/cp/constexpr.c:4535
0xa33b44 cxx_eval_constant_expression
        /home/vegard/git/gcc/gcc/cp/constexpr.c:4564
0xa35825 cxx_eval_constant_expression
        /home/vegard/git/gcc/gcc/cp/constexpr.c:4399
0xa4de8a cxx_eval_outermost_constant_expr
        /home/vegard/git/gcc/gcc/cp/constexpr.c:4830
0xa5e2bb fold_non_dependent_expr(tree_node*)
        /home/vegard/git/gcc/gcc/cp/constexpr.c:5113
0x142dbd7 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        /home/vegard/git/gcc/gcc/cp/typeck2.c:825
0xb49988 check_initializer
        /home/vegard/git/gcc/gcc/cp/decl.c:6422
0xbe1ec6 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        /home/vegard/git/gcc/gcc/cp/decl.c:6975
0xfa4c59 cp_parser_init_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:19729
0xfa99d7 cp_parser_simple_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:13063
0xfafbc8 cp_parser_block_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:12881
0xfb2094 cp_parser_declaration_statement
        /home/vegard/git/gcc/gcc/cp/parser.c:12474
0xefef9b cp_parser_statement
        /home/vegard/git/gcc/gcc/cp/parser.c:10923
0xf02a5b cp_parser_statement_seq_opt
        /home/vegard/git/gcc/gcc/cp/parser.c:11272
0xf034fa cp_parser_compound_statement
        /home/vegard/git/gcc/gcc/cp/parser.c:11226
0xf96a6b cp_parser_function_body
        /home/vegard/git/gcc/gcc/cp/parser.c:21776
0xf96a6b cp_parser_ctor_initializer_opt_and_function_body
        /home/vegard/git/gcc/gcc/cp/parser.c:21811
0xf9fc75 cp_parser_function_definition_after_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:26816
0xfa62cd cp_parser_function_definition_from_specifiers_and_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:26733

$ xgcc --version
xgcc (GCC) 8.0.1 20180303 (experimental)

Built from git 0d86c284d085d29782d862600a79aa1ff0ee0c47 (r258221).

Test case was minimised by C-Reduce.

Reply via email to