I get the following error message: mtftypesM.f90:615.71: real (DOUB_PREC), parameter :: DEFAULT_MTF_FIELDS(2, MTF_FIELD_PTS) = & 1 Error: Extension: Evaluation of nonstandard initialization expression at (1) mtftypesM.f90:441.52: on the following line of code: real (DOUB_PREC), parameter :: DEFAULT_MTF_FIELDS(2, MTF_FIELD_PTS) = & & reshape ((/0.0_DOUB_PREC, 0.0_DOUB_PREC, 0.0_DOUB_PREC, 0.35_DOUB_PREC, 0.0_DOUB_PREC, 0.7_DOUB_PREC,& & 0.0_DOUB_PREC, 0.85_DOUB_PREC, 0.0_DOUB_PREC, 1.0_DOUB_PREC/), shape = (/2_TinyInteger, MTF_FIELD_PTS/)) where integer, parameter :: DefaultInteger = kind (1) integer(DefaultInteger), parameter :: TinyInteger = selected_int_kind (2) integer(DefaultInteger), parameter :: DOUB_PREC = selected_real_kind (15, 307) integer (TinyInteger), parameter :: MTF_FIELD_PTS = 5_TinyInteger I believe this may be the same as bug 29962. Note that the following compilers all correctly compile this code: Lahey LF64, NAG version 5.1, Intel version 10, g95. Norm Clerman
What compiler options did you use? Can you provide a self contained example?
I can reproduce the problem with gfortran 4.1 and 4.2 with -std=f95/-std=f2003; however, gfortran 4.3.0 compiles this program with -std=f95 without showing this error. I therefore suggest you to either don't use -std=f95 or -std=f2003 for this file or to use the 4.3.0 compiler of gfortran, available from, e.g., http://gcc.gnu.org/wiki/GFortranBinaries As this bug is no regression, does not generate wrong code and can easily be worked around by not using -std=f*, we will not backport the fixes to GCC 4.2.x or even 4.1.x. (Last but not least in order to not inadvertently induce regressions.) It would be nice, if you could confirm that the error is indeed fixed in GCC 4.3.0. Thanks for reporting the bug.
Subject: Re: error reported on correct initialization code. burnus, Thank you for your very prompt reply. I tried version 4.3.0; the bug does not exist in it. Using this version I have located a new bug that I have reported. It's bug 33529. Thanks for your attention. Norm Clerman burnus at gcc dot gnu dot org wrote: > ------- Comment #2 from burnus at gcc dot gnu dot org 2007-09-21 07:58 ------- > I can reproduce the problem with gfortran 4.1 and 4.2 with -std=f95/-std=f2003; > however, gfortran 4.3.0 compiles this program with -std=f95 without showing > this error. > > I therefore suggest you to either don't use -std=f95 or -std=f2003 for this > file or to use the 4.3.0 compiler of gfortran, available from, e.g., > http://gcc.gnu.org/wiki/GFortranBinaries > > As this bug is no regression, does not generate wrong code and can easily be > worked around by not using -std=f*, we will not backport the fixes to GCC 4.2.x > or even 4.1.x. (Last but not least in order to not inadvertently induce > regressions.) > > It would be nice, if you could confirm that the error is indeed fixed in GCC > 4.3.0. > > Thanks for reporting the bug. > > >
Subject: Re: error reported on correct initialization code. kargl, Thanks for your very prompt reply. burnus also replied to my bug suggesting I try version 4.3.0. I did that, and the bug is not present. Using this version I have located a new bug that I have reported. It's bug 33529. Thanks for your attention. Norm Clerman kargl at gcc dot gnu dot org wrote: > ------- Comment #1 from kargl at gcc dot gnu dot org 2007-09-21 03:46 ------- > What compiler options did you use? > Can you provide a self contained example? > > >
Fixed on 4.3.