http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54634
Bug #: 54634
Summary: [4.8 Regression] miscompilation with -O3
-ftree-loop-distribution
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 28227
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28227
testcase sources
The attached sources are miscompiled with current trunk ([trunk revision
191430]) at -O3 -ftree-loop-distribution. To reproduce
gfortran -O3 -ftree-loop-distribution -ffree-form other.F mathconstants.F
orbital_pointers.F orbital_symbols.F orbital_transformation_matrices.F main.F ;
./a.out
which outputs wrong values (as compared to -O0) and shows a valgrind warning
(not present at -O0).
The miscompiled file is orbital_transformation_matrices.F, most likely the
routine create_spherical_harmonics (which seems inlined). If I cat at files in
a single .F file, the error also disappears, which might hint at some ipa thing
?
4.7 branch ([gcc-4_7-branch revision 190437]) is doing fine.