gfortran, ncar and blockdata_test failures

Walter Spector w6ws@earthlink.net
Sat Nov 17 14:40:00 GMT 2007


The other half of this issue is on the BLOCK DATA side.  There has to be
an entry point that the linker can find:

$ cat testbd.f
      BLOCKDATA BDTEST
      COMMON/TEST/WK
      INTEGER WK
      DATA WK/20/
      END
$ gfortran testbd.f -c
$ nm testbd.o
00000000 b .bss
00000000 d .data
00000000 t .text
00000000 B _bdtest_    <<<< gfortran creates a BSS section
00000000 D _test_
$ g77 -c testbd.f
$ nm testbd.o
00000000 b .bss
00000000 d .data
00000000 t .text
00000000 T _bdtest_    <<<< g77 creates a TEXT entry (even though no code exists)
00000000 D _test_
$

Again, while there used to be debates about whether the Standard required
this to work, many older packages depend on it.

W.



More information about the Fortran mailing list