g77 large array

Susukita Ryutaro susukita@postman.riken.go.jp
Tue Oct 14 08:30:00 GMT 2003


This may not be a bug, but I hope it will be fixed.

      CALL A
      END

      SUBROUTINE A
      INTEGER I(33554432)
      I(33554432) = 0
      END

I can compile and execute the program successfully like:

> g77 test.f
> ./a.out

But if I add SUBROUTINE B, it fails with 'Segmentation fault'. 

      CALL A
      CALL B
      END

      SUBROUTINE A
      INTEGER I(33554432)
      I(33554432) = 0
      END

      SUBROUTINE B
      INTEGER I(8388608)
      END

Even if I do not call B, it fails with 'Segmentation fault'. 

      CALL A
      END

      SUBROUTINE A
      INTEGER I(33554432)
      I(33554432) = 0
      END

      SUBROUTINE B
      INTEGER I(8388608)
      END

My environment is

> g77 -v
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/3.3.1/specs
Configured with: ./configure --enable-languages=f77
Thread model: posix
gcc version 3.3.1

SUSUKITA, Ryutaro
The Institute of Physical and Chemical Research (RIKEN)
Computational Astrophysics Laboratory



More information about the Gcc mailing list