GFortran: segmentation fault
François-Xavier Coudert
fxcoudert@gmail.com
Wed Aug 29 18:02:00 GMT 2007
Hi Benjamin,
> As I told you, I used the same OS (Win XP) and GFortran version (4.3.0
> 20070612) than V. Trinité:
Hum, that doesn't answer the last question: "what terminal/console are
you running gfortran in?". From what I see below, it appears to be
from a Windows command prompt (cmd.exe), is that right?
> moyenne_sigma_test.f: In function 'MAIN__':
> moyenne_sigma_test.f:167: internal compiler error: Segmentation fault
OK, I still can't reproduce that bug with a current version, but I can
with the older version you used. So, that bug was fixed between
2007-06-12 and now. Please continue using the latest binaries for
further testing and production.
> 5- Test with the last release of GFortran
> ======================================
> I actually looked for a newer release, but I might have bad looked, because
> I could not find any. I tried with the one you gave me:
A link to download the latest compiler can always be found here:
http://gcc.gnu.org/wiki/GFortranBinaries
> The compilation seems to be OK.. But there seems to be still a memory problem.. Please check the other source: moyenne_sigma_last-french_version.f (which was my original program), try to compile it and execute it (without any argument) with nmaxbox=5 and nmaxbox=50: with nmaxbox=50 => Windows error: "memory cannot be 'read' "
Yes, but that's a different bug, and it's a bug in your code ;-)
Debugging (with gdb) moyenne_sigma_last-french_version.f indicates
that, when no argument is given, a usage error message is output, then
the control goes to label 1000, which goes on and writes a gnuplot
file. But, when it reaches lines 242-246, it tries to output things
like longmin(:), which were never initialized. Thus, we are accessing
uninitialized memory, which leads to the error.
Happy Fortran hacking!
FX
More information about the Fortran
mailing list