[Bug middle-end/58746] [4.9 Regression] Incorrect warning with -Waggressive-loop-optimizations
Joost.VandeVondele at mat dot ethz.ch
gcc-bugzilla@gcc.gnu.org
Wed Nov 27 09:07:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58746
--- Comment #2 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
this testcase gives the same error without LTO. Just -O2 is sufficient:
INTEGER, PARAMETER :: dp = 8
REAL(KIND=dp), VOLATILE :: r=0.1_dp
r = expint(1,r)
CONTAINS
FUNCTION expint(n,x)
REAL(dp) :: x, expint
INTEGER :: maxit=100
nm1=n-1
DO i=1,MAXIT
IF(i.NE.nm1) THEN
DO ii=1,nm1
psi=psi+1.0_dp/ii
END DO
del=fact*(-LOG(x)+psi)
END IF
expint=expint+del
END DO
END FUNCTION expint
END
More information about the Gcc-bugs
mailing list