--- Comment #6 from rguenth at gcc dot gnu dot org 2009-09-03 11:40 ---
This looks like your restrict changes get in the way. We have
y_13 = (real(kind=8) & restrict) &y;
..
*y_13 = D.1416_35;
...
D.1412_51 = y;
so one access via the plain y gets re-introduced by forwprop someho
--- Comment #5 from jpr at csc dot fi 2009-09-03 10:40 ---
Adding -fstrict-aliasing to -O1 breaks the code:
gfortran -o m m.f90 -O1; ./m
y= 0.60653065945526063 2*y= 1.2130613189105213
gfortran -o m m.f90 -O1 -fstrict-aliasing ; ./m
y= 0.60653065945526063 2*y= 2.00
--- Comment #4 from jpr at csc dot fi 2009-09-03 07:10 ---
FWIW: I had a look at the -fdump-tree-all files.
All seems well (to my untrained eyes), until
:
D.1412_51 = y;
D.1430_52 = D.1412_51 * 2.0e+0;
z = D.1430_52;
in m.f90.060t.phiprop
is transformed to
:
D.1412_51 = 1.0e+0
--- Comment #3 from ubizjak at gmail dot com 2009-09-01 17:31 ---
Per comment #2.
--
ubizjak at gmail dot com changed:
What|Removed |Added
Status|UNCONFIRMED