This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Why does gfortran do this?
- From: Tobias Burnus <burnus at net-b dot de>
- To: eric at physics dot wustl dot edu
- Cc: fortran at gcc dot gnu dot org
- Date: Sat, 07 Feb 2009 22:08:18 +0100
- Subject: Re: Why does gfortran do this?
- References: <498DF188.3020108@physics.wustl.edu>
Eric Inazaki wrote:
> GNU Fortran (GCC) 4.2.1 (SUSE Linux)
> Warning: Obsolete: GOTO at (1) jumps to END of construct at (2)
>
The warning itself is a bug, cf.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38507. But the warning is
just a warning and harmless. As GCC is currently in stage4 (regression
and documentation fixes only), it won't be fixed until 4.5. (The release
of 4.4.0 is imminent.)
> This seems to be part of a pattern. I'm working on a larger program
> that under some circumstances core dumps and under other circumstances
> works fine (maybe). As far as I can tell, the difference between a
> dumpy and non-dumpy program is that certain write statements are commented
> out. Is gf 4.2.1 buggy or fragile?
In general gfortran 4.2.x is in a pretty good shape, which of cause does
not rule out that you hit a bug. You could try GCC 4.3 or GCC 4.4, for
which some corner cases have been fixed (and new features have been
added). If you have openSUSE 10.3 or later (or SLES 9/10), you can find
GCC 4.3 packages at http://software.opensuse.org/search. For openSUSE
11.x/Factory you can even find GCC 4.4 builds. Otherwise, you could try
the build at http://gcc.gnu.org/wiki/GFortranBinaries#GNU/Linux
To debug core dumps, I found "valgrind" (compile with "-g") a quite
useful tool. You could also try the option -finit-local-zero (with
gfortran 4.3/4.4) as especially older programs assume that variables are
initialized by zero (which some compilers do by default). Good luck in
tracking the problem!
Tobias