bug? runtime error passing POD

FX Coudert fxcoudert@gmail.com
Mon Jul 4 18:39:00 GMT 2005


> Compiling and linking results in:
> $>./test.g77
>  n =  42
> $> ./test.gfortran
> Fortran runtime error: End of record
> 
> Question: Bug in gfortran or misunderstanding on my side?

Bug in gfortran, your code is good.

After a few trials, I guess you used static linking. There seems to be a 
bad interaction between using a C main program and statically linking 
libgfortran/libgfortranbegin.

To gfortran developers: when libgfortran is statically linked, the 
init() constructor routine is not called when the program is run. Is 
that normal? (I guess no, since this is why this bug arise) How could we 
work around that bug?

FX



More information about the Fortran mailing list