https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109313
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
When ccp3 changes (correctly):
<bb 4> [local count: 958878296]:
.ASAN_MARK (POISON, &d, 4);
[/app/example.cpp:6:24] b.1_2 = b;
[/app/example.cpp:6:24] _3 = b.1_2 + 1;
[/app/example.cpp:6:24] b = _3;
[/app/example.cpp:6:18] if (_3 <= 0)
goto <bb 3>; [94.50%]
else
goto <bb 6>; [5.50%]
<bb 5> [local count: 55807731]:
.ASAN_MARK (POISON, &d, 4);
<bb 6> [local count: 114863531]:
[/app/example.cpp:12:13] _5 = d;
Into:
<bb 4> [local count: 958878296]:
d_9 = .ASAN_POISON ();
[/app/example.cpp:6:24] b.1_2 = b;
[/app/example.cpp:6:24] _3 = b.1_2 + 1;
[/app/example.cpp:6:24] b = _3;
[/app/example.cpp:6:18] if (_3 <= 0)
goto <bb 3>; [94.50%]
else
goto <bb 6>; [5.50%]
<bb 5> [local count: 55807731]:
d_6 = .ASAN_POISON ();
<bb 6> [local count: 114863531]:
# d_22 = PHI <[0:0] d_6(5), [0:0] d_9(4)>
[/app/example.cpp:12:13] _5 = d_22;
The location of the load is missing and now is always a direct poison call
without any location info left over.
I am not sure how this would work out really ...