[Bug fortran/18271] ICE with computed array declaration

manfred99 at gmx dot ch gcc-bugzilla@gcc.gnu.org
Fri Nov 4 15:32:00 GMT 2005



------- Comment #5 from manfred99 at gmx dot ch  2005-11-04 15:32 -------

1) There is an easy way to circumvent the ICE: 
if you add an explicit type conversion for IMAX, such as in
      REAL:: AUX1(25000+INT(0.82*float(IMAX)))
the ICE goes away and gfortran compiles it successfully and 
without warnings, even with "-std=f95".



2) WRT invalid code:
I checked the code with the Lahey Source Check, ifort, SUN f95 and g95:

--> Lahey/Fujitsu Fortran 95 (lf95): no errors, no warnings

--> Lahey Fortran 90 (lf90): error at INT expression
Line 5, file SOURCE.F90
      REAL:: AUX1(25000+INT(0.82*IMAX))
                        |
FATAL -- Specification expression required.


--> Intel ifort 8.1: no errors, no warnings with "-warn all -stand f90"

--> SUN Workshop f95 6.2: no errors, no warnings with "-w4"

--> g95: no errors, no warnings with "-std=f95"


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18271



More information about the Gcc-bugs mailing list