http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50327
Bug #: 50327
Summary: [4.7 Regression] Front-end optimization generates
wrong code for BLAS's srotmg
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: major
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created attachment 25227
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25227
Netlib BLAS's srotmg.f (== lapack-3.3.1/BLAS/SRC/srotmg.f)
Compiling BLAS' srotmg.f with -ffrontend-optimize causes an endless loop:
$ gfortran -ffrontend-optimize -c srotmg.f; gfortran -O0 test.f90 srotmg.o \
&& ./a.out
CALLING: SROTMG
Without, it works:
$ gfortran -fno-frontend-optimize -c srotmg.f; gfortran -O0 test.f90 srotmg.o
\
&& ./a.out
CALLING: SROTMG
DONE CALLING: SROTMG
FAILING: 2011-09-08, 2011-08-25-r178053, 05-28-r174379, 2011-05-10,
WORKING: 2010-09-28-r164677 (with -O3, -ffrontend-optimize didn't exist yet)
Seemingly also working: Current 4.6 branch.
implicit none
real DTEMP(9)
EXTERNAL SROTMG
DTEMP(1) = 2.00000003E-10
DTEMP(2) = 3.99999991E-02
DTEMP(3) = 100000.000
DTEMP(4) = 10.0000000
DTEMP(5) = 0.00000000
WRITE (*,*)' CALLING: SROTMG'
CALL SROTMG(DTEMP(1),DTEMP(2),DTEMP(3),DTEMP(4),DTEMP(5))
WRITE (*,*)' DONE CALLING: SROTMG'
end