------- Comment #8 from kargl at gcc dot gnu dot org 2009-01-20 19:41 ------- (In reply to comment #7) > I have a patch that not only fixes the ICE, but it will issue an > error for a program of the form > > troutmask:sgk[203] cat a.f90 > program a > real z(int(transfer(2.e0**2.e0, 1.e0)) + 1) > z = 1. > print '(5ES12.5)', z > end program a > troutmask:sgk[204] gfc4x -o z a.f90 > troutmask:sgk[205] ./z > 1.00000E+00 1.00000E+00 1.00000E+00 1.00000E+00 1.00000E+00 > troutmask:sgk[206] gfc4x -o z -std=f95 a.f90 > a.f90:2.32: > > real z(int(transfer(2.e0**2.e0, 1.e0)) + 1) > 1 > Error: Fortran 2003: Noninteger exponent in an initialization expression at > (1) > > Note, I plan to change the word initialization to restricted. >
Dang, I got this wrong. There is a distinction between an initialization and specification expressions where a non-integer exponent is indeed allowed in the latter and prohibited in the former. I, at least, still have the ICE fixed. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38822