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

            Bug ID: 84943
           Summary: internal compiler error: in build_call_a, at
                    cp/call.c:374
           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:

void a() { a[0]() }

Output:

$ cc1plus 
 void a()
<stdin>:1:15: warning: pointer to a function used in arithmetic
[-Wpointer-arith]
<stdin>:1:17: internal compiler error: in build_call_a, at cp/call.c:374
0x8bd3d7 build_call_a(tree_node*, int, tree_node**)
        /home/vegard/git/gcc/gcc/cp/call.c:372
0x8c7d79 build_cxx_call(tree_node*, int, tree_node**, int)
        /home/vegard/git/gcc/gcc/cp/call.c:8663
0x13f7f75 cp_build_function_call_vec(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        /home/vegard/git/gcc/gcc/cp/typeck.c:3775
0x127d98e finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**,
bool, bool, int)
        /home/vegard/git/gcc/gcc/cp/semantics.c:2521
0xf77968 cp_parser_postfix_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:7246
0xf2a4b7 cp_parser_unary_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:8322
0xebfeca cp_parser_cast_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9090
0xec24f6 cp_parser_binary_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9191
0xec62ca cp_parser_assignment_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9486
0xeca236 cp_parser_expression
        /home/vegard/git/gcc/gcc/cp/parser.c:9655
0xede7b6 cp_parser_expression_statement
        /home/vegard/git/gcc/gcc/cp/parser.c:11131
0xefa0e0 cp_parser_statement
        /home/vegard/git/gcc/gcc/cp/parser.c:10935
0xefe5eb cp_parser_statement_seq_opt
        /home/vegard/git/gcc/gcc/cp/parser.c:11274
0xeff08a cp_parser_compound_statement
        /home/vegard/git/gcc/gcc/cp/parser.c:11228
0xf9283b cp_parser_function_body
        /home/vegard/git/gcc/gcc/cp/parser.c:21778
0xf9283b cp_parser_ctor_initializer_opt_and_function_body
        /home/vegard/git/gcc/gcc/cp/parser.c:21813
0xf9ba45 cp_parser_function_definition_after_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:26818
0xfa209d cp_parser_function_definition_from_specifiers_and_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:26735
0xfa209d cp_parser_init_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:19502
0xfa57a7 cp_parser_simple_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:13065
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.

Version:

GNU C++14 (GCC) version 8.0.1 20180306 (experimental) (x86_64-pc-linux-gnu)

The error itself looks VERY similar to bug #67533 but the code is sufficiently
different that I think it might be a different underlying problem so I'm
opening a new bug.

Reply via email to