This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38822] Compile-time simplification of x**(real) / ICE in in gfc_target_encode_expr
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jan 2009 19:22:29 -0000
- Subject: [Bug fortran/38822] Compile-time simplification of x**(real) / ICE in in gfc_target_encode_expr
- References: <bug-38822-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from kargl at gcc dot gnu dot org 2009-01-20 19:22 -------
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.
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |kargl at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Priority|P3 |P4
Last reconfirmed|0000-00-00 00:00:00 |2009-01-20 19:22:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38822