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

--- Comment #8 from Kerem Kat <keremkat+gcc at gmail dot com> ---
^ correction> not reproducible with 9.2.1, reproducible with gcc-10 trunk as:

$ gcc z1.c
79412-ice.c:6:5: error: conflicting types for ‘a’
    6 | int a[] = {2};
      |     ^
79412-ice.c:1:5: note: previous declaration of ‘a’ was here
    1 | int a;
      |     ^
79412-ice.c: In function ‘fn1’:
79412-ice.c:4:4: internal compiler error: in fold_convert_loc, at
fold-const.c:2435
    4 |   a++;
      |   ~^~
0x61908f fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc/gcc/fold-const.c:2435
0xb29b8e gimplify_self_mod_expr(tree_node**, gimple**, gimple**, bool,
tree_node*)
        ../../gcc/gcc/gimplify.c:3178
0xb2305f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gcc/gimplify.c:13496
0xb26e5a gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gcc/gimplify.c:6814
0xb27c5e gimplify_bind_expr
        ../../gcc/gcc/gimplify.c:1424
0xb24569 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gcc/gimplify.c:13767
0xb26e5a gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gcc/gimplify.c:6814
0xb289de gimplify_body(tree_node*, bool)
        ../../gcc/gcc/gimplify.c:14814
0xb28dd7 gimplify_function_tree(tree_node*)
        ../../gcc/gcc/gimplify.c:14958
0x984337 cgraph_node::analyze()
        ../../gcc/gcc/cgraphunit.c:669
0x987266 analyze_functions
        ../../gcc/gcc/cgraphunit.c:1212
0x987eb6 symbol_table::finalize_compilation_unit()
        ../../gcc/gcc/cgraphunit.c:2958

Reply via email to