This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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] | |
To be more precise, my copy of M&R&C says: "if stat= is absent and the allocation is unsuccessgul, program execution stops" which implies, to me, that if stat= is present the it should NOT stop, and thus the following program should print its own message. Whether gfortran's own message should be printed or not is somewhat beside the point... Thanks [sfilippo@localhost bugtest]$ gfortran -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.2.0/configure --prefix=/usr/local/gcc42 --with-mpfr=/home/travel/GCC/BUILDS/mpfr --with-gmp-lib=/home/travel/GCC/BUILDS/gmp/lib/ --with-gmp=/home/travel/GCC/BUILDS/gmp Thread model: posix gcc version 4.2.0 [sfilippo@localhost bugtest]$ gfortran -o tryalloc tryalloc.f90 [sfilippo@localhost bugtest]$ ./tryalloc Fortran runtime error: Attempt to allocate negative amount of memory. Possible integer overflow [sfilippo@localhost bugtest]$ more tryalloc.f90 program tryalloc real(kind(1.d0)), allocatable :: x(:,:) integer :: info allocate(x(100000,100000),stat=info) write(*,*) 'Should reach this and report a nonzero (failure) ',info end program tryalloc
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |