re PR fortran/26017 (allocate (a(1:-1)) should yield zero-sized array)
authorThomas Koenig <Thomas.Koenig@online.de>
Sun, 16 Apr 2006 20:29:24 +0000 (20:29 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 16 Apr 2006 20:29:24 +0000 (20:29 +0000)
commit3c86fb4e17941da9eb4026bda6301bf0a74a96fe
tree50e4ad3d8a48e6299d17a219b0a2d98448670795
parente13d2b4e53067e117eb250bbf39c948ec6bd48e6
re PR fortran/26017 (allocate (a(1:-1)) should yield zero-sized array)

2006-04-16  Thomas Koenig  <Thomas.Koenig@online.de>

PR fortran/26017
* trans-array.c(gfc_array_init_size):  Introduce or_expr
which is true if the size along any dimension
is negative.  Create a temporary variable with base
name size.  If or_expr is true, set the temporary to 0,
to the normal size otherwise.

2006-04-16  Thomas Koenig  <Thomas.Koenig@online.de>

        * gfortran.dg/allocate_zerosize_1.f90:  New test.

From-SVN: r112988
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/allocate_zerosize_1.f90 [new file with mode: 0644]