http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50564
Bug #: 50564
Summary: [4.7 Regression] Front-end optimization - ICE with
FORALL
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Reported by Andrew Benson at
http://gcc.gnu.org/ml/fortran/2011-09/msg00154.html
With -ffrontend-optimize, gfortran ICEs with
internal compiler error: in gfc_trans_forall_1, at fortran/trans-stmt.c:3796
Workaround: -fno-frontend-optimize
Said to be a 4.7 regression.
Test case:
program test
implicit none
double precision, allocatable, dimension(:) :: timeSteps
integer :: iTime
double precision :: ratio
forall(iTime=1:2)
timeSteps(iTime)=ratio**(dble(iTime)-0.5d0)-ratio**(dble(iTime)-1.5d0)
end forall
end program test