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

            Bug ID: 81695
           Summary: [5/6/7/8 Regression] internal compiler error: in
                    size_binop_loc, at fold-const.c:1768
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

int z[] = { };

int
main (int argc, char *argv[])
{
  __builtin_printf ("%d\n", *(z + 1));
}

gives

$ ./cc1 -quiet s.c
s.c: In function ‘main’:
s.c:6:3: internal compiler error: in size_binop_loc, at fold-const.c:1768
   __builtin_printf ("%d\n", *(z + 1));
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0xac0fc6 size_binop_loc(unsigned int, tree_code, tree_node*, tree_node*)
        /home/marek/src/gcc/gcc/fold-const.c:1767
0xaf576d fold_indirect_ref_1(unsigned int, tree_node*, tree_node*)
        /home/marek/src/gcc/gcc/fold-const.c:14114
0xaf5b07 fold_indirect_ref_loc(unsigned int, tree_node*)
        /home/marek/src/gcc/gcc/fold-const.c:14163
0xb9831a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marek/src/gcc/gcc/gimplify.c:11433
0xb9b2d2 gimplify_expr
        /home/marek/src/gcc/gcc/gimplify.c:12321
0xb73253 gimplify_arg(tree_node**, gimple**, unsigned int, bool)
        /home/marek/src/gcc/gcc/gimplify.c:3082
0xb74470 gimplify_call_expr
        /home/marek/src/gcc/gcc/gimplify.c:3302
0xb97a2f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marek/src/gcc/gcc/gimplify.c:11292
0xb8073b gimplify_stmt(tree_node**, gimple**)
        /home/marek/src/gcc/gcc/gimplify.c:6542
0xb6d8a2 gimplify_bind_expr
        /home/marek/src/gcc/gcc/gimplify.c:1290
0xb98823 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marek/src/gcc/gcc/gimplify.c:11520
0xb8073b gimplify_stmt(tree_node**, gimple**)
        /home/marek/src/gcc/gcc/gimplify.c:6542
0xb6f188 gimplify_statement_list
        /home/marek/src/gcc/gcc/gimplify.c:1732
0xb997ab gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marek/src/gcc/gcc/gimplify.c:11748
0xb8073b gimplify_stmt(tree_node**, gimple**)
        /home/marek/src/gcc/gcc/gimplify.c:6542
0xb9bfa2 gimplify_body(tree_node*, bool)
        /home/marek/src/gcc/gcc/gimplify.c:12517
0xb9c8cd gimplify_function_tree(tree_node*)
        /home/marek/src/gcc/gcc/gimplify.c:12675
0x983fde cgraph_node::analyze()
        /home/marek/src/gcc/gcc/cgraphunit.c:668
0x9858cd analyze_functions
        /home/marek/src/gcc/gcc/cgraphunit.c:1129
0x98a241 symbol_table::finalize_compilation_unit()
        /home/marek/src/gcc/gcc/cgraphunit.c:2607
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.

Reply via email to