In the attached testcase v3 points to itself and is then assigned the value 123.
However, foo gets inlined at the rtl level in O1 or at the tree level in O2 and
causes the return value to be 20, on my machine, instead of 123 as is expected and
is returned on gcc 3.3 with and without optimizations.
Created attachment 5294 [details]
testcase for self-pointing pointer
This is an aliasing violation; your test case is invalid.
Reopening to ...
Mark as a dup of bug 21920
*** This bug has been marked as a duplicate of 21920 ***