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

--- Comment #9 from qinzhao at gcc dot gnu.org ---
the direct cause of the ICE is because:

MEM[(int[0:D.1993] *)&fb.3] = .DEFERRED_INIT (16, 2, 1);

in the above, the fb.3 is in REG instead MEM:

8451              gcc_assert (MEM_P (result));
(gdb) call debug_tree(exp)
 <var_decl 0x7fffe94605a0 fb.3
    type <array_type 0x7fffe9463498
        type <integer_type 0x7fffe9463348 public unsigned QI
            size <integer_cst 0x7fffe92f8e28 constant 8>
            unit-size <integer_cst 0x7fffe92f8e40 constant 1>
            align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffe9463348 precision:8 min <integer_cst 0x7fffe94427b0 0> max <integer_cst
0x7fffe9317420 255>>
        TI
        size <integer_cst 0x7fffe92f8d80 constant 128>
        unit-size <integer_cst 0x7fffe92f8d98 constant 16>
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffe9463498
        domain <integer_type 0x7fffe94633f0 type <integer_type 0x7fffe9313000
sizetype>
            DI
            size <integer_cst 0x7fffe92f8d38 constant 64>
            unit-size <integer_cst 0x7fffe92f8d50 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffe94633f0 precision:64 min <integer_cst 0x7fffe92f8d68 0> max <integer_cst
0x7fffe94427e0 15>>
        pointer_to_this <pointer_type 0x7fffe9463540>>
    used ignored TI pr82421.c:10:7 size <integer_cst 0x7fffe92f8d80 128>
unit-size <integer_cst 0x7fffe92f8d98 16>
    align:128 warn_if_not_align:0 context <function_decl 0x7fffe9436100 qy>
    (reg:TI 84 [ fb.3 ])>

fb.3 is introduced by CCP transformation, disabling tree-ccp cures the failure
by adding -fno-tree-ccp.

I suspect that ccp might have a bug that does not mark TREE_ADDRESSABLE
correctly for fb.3.

Reply via email to