What version of gfortran are you using? What platform (CPU & OS) are
you running on? (Both questions are answered by the output of
"gfortran -v".)
> If I compile with -O0 -g flags I get segmentation fault, and precisely
> on a line of a function which does a simple "max" operation. To make
> it simple, the function is called by a loop, and the SIGSEGV occurs
> after a lot of loop iterations.
Sounds like an out-of-bounds array access to me (but of course,
without seeing code, it's just guessing). Have you tried to compile
with -O0 -g -fbounds-check and see if it gives you a runtime error
message? (which would include a location for the out-of-bounds access)
> /usr/lib/libgfortran.so.2(_gfortran_internal_free+0x21)[0xb77642a1]
> /home/diego/Work/Development/DNSNatu/Debug/DNSNatu[0x8051217]
> /home/diego/Work/Development/DNSNatu/Debug/DNSNatu[0x8068799]
> /home/diego/Work/Development/DNSNatu/Debug/DNSNatu[0x80700ce]
> /home/diego/Work/Development/DNSNatu/Debug/DNSNatu[0x804980b]
> /home/diego/Work/Development/DNSNatu/Debug/DNSNatu[0x80824b7]
These frames are the one that would be interesting: why isn't there
any source line information? Are you sure you compiled everything with
-g?
FX
--
FX Coudert
http://www.homepages.ucl.ac.uk/~uccafco/
Could you download a more recent version of gfortran to see if it was
one of the bugs fixed for the 4.3.0 release? I suggest downloading
binaries from http://gcc.gnu.org/wiki/GFortranBinaries (you don't need
to be administrator on your computer to install them and use them).
They are slightly older than the builds at
http://gcc.gnu.org/wiki/GFortranBinaries, but not much.
Tobias
According to Jerry, "This could be caused by an alignment problem with
the ioparm def". The question is only why it happens.
In principle, 4.3.0 (release) should support the same units as older
versions though the ABI might be not 100% the same (which is the case
for old 4.3.0 developer releases).
Tobias