[Bug tree-optimization/126848] Repeated reads of an indeterminate value do not yield the same value

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Aug 13 17:04:12 GMT 2026


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

--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
>From ccp1 dump:
```

Visiting statement:
a_2 = .DEFERRED_INIT (4, 3, &"a"[0]);
which is likely UNDEFINED
Lattice value changed to UNDEFINED.  Adding SSA edges to worklist.
marking stmt to be not simulated again
...

Visiting statement:
x_5 = a_2;
which is likely UNDEFINED
Lattice value changed to UNDEFINED.  Adding SSA edges to worklist.
marking stmt to be not simulated again
Adding destination of edge (3 -> 5) to worklist

Simulating block 5

Visiting PHI node: x_1 = PHI <x_5(3), x_4(4)>
        Argument #0 (3 -> 5 executable)
        x_5     Value: UNDEFINED
        Argument #1 (4 -> 5 executable)
        x_4     Value: CONSTANT 1

    PHI node value: CONSTANT 1

Lattice value changed to CONSTANT 1.  Adding SSA edges to worklist.
marking stmt to be not simulated again
```

So maybe a_2  should have been varrying rather than undefined.


More information about the Gcc-bugs mailing list