This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

g77 large array


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]