not seen on trunk, 4.4 branch prints an error message, 4.3 ICEs:

$ cat myProg.f95
PROGRAM myProg
  REAL :: sqrt2 = 2**0.5
  PRINT*, sqrt2
END PROGRAM myProg

$ gfortran-4.3 myProg.f95
myProg.f95: In function 'myprog':
myProg.f95:1: internal compiler error: in gfc_conv_constant, at
fortran/trans-const.c:296
Please submit a full bug report,
with preprocessed source if appropriate.

$ gfortran-4.4 myProg.f95
myProg.f95:2.17:

  REAL :: sqrt2 = 2**0.5
                 1
Error: non-constant initialization expression at (1)


-- 
           Summary: Unable to give initial value 2**0.5 to a real varable
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org


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

Reply via email to