------- Comment #9 from burnus at gcc dot gnu dot org 2008-10-15 09:22 ------- Thanks for the bugreport, however, it works here with GCC 4.4, 4.3, 4.2 and 4.1.
Your GCC -- "gcc version 4.0.3" -- is ancient. GCC 4.0 was branched on Feb 25 2005 while some fixes still went into the 4.0 branch, most work went into GCC 4.1 which was then branched on Nov 18 2005, which is also already 3 years ago. GCC 4.0 was the first GCC version which shipped gfortran and gfortran had lots of bugs back then. GCC 4.1.x is the oldest GCC one should use for gfortran. However, gfortran 4.2 and 4.3 are much stabler. I would suggest to update to 4.3.2 (latest stable release) or to 4.4.0 (latest developer release). If needed be 4.2.x and maybe also 4.1.x can be used, but 4.0 is definitely too buggy. Nightly builds of gfortran are available at: http://gcc.gnu.org/wiki/GFortranBinaries -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37833