------- 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. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33513