#558728 [PR42550, fixed in 4.5] gfortran: Unable to give initial value

Package:
gfortran
Source:
gcc-defaults
Description:
GNU Fortran 95 compiler
Submitter:
Wang Long
Date:
2010-01-18 17:03:40 UTC
Severity:
normal
#558728#5
Date:
2009-11-30 04:45:01 UTC
From:
To:
The following fortran 95 code cannot be compiled:

PROGRAM myProg
  REAL :: sqrt2 = 2**0.5
  PRINT*, sqrt2
END PROGRAM myProg

This is the commandline output:
$ 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.
See <file:///usr/share/doc/gcc-4.3/README.Bugs> for instructions.

$ gfortran-4.4 myProg.f95
myProg.f95: In function ‘myprog’:
myProg.f95:1: internal compiler error: in gfc_conv_constant, at fortran/trans-const.c:352
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.

#558728#10
Date:
2009-12-30 00:43:16 UTC
From:
To:
forwarded 558728 http://gcc.gnu.org/PR42550
tags 558728 + upstream
tags 558728 + fixed-upstream
retitle 558728 [PR42550, fixed in 4.5] gfortran: Unable to give initial value
2**0.5 to a real variable
thanks