This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/26017] allocate (a(1:-1)) should yield zero-sized array
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Apr 2006 20:29:29 -0000
- Subject: [Bug fortran/26017] allocate (a(1:-1)) should yield zero-sized array
- References: <bug-26017-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from tkoenig at gcc dot gnu dot org 2006-04-16 20:29 -------
Subject: Bug 26017
Author: tkoenig
Date: Sun Apr 16 20:29:24 2006
New Revision: 112988
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112988
Log:
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.
Added:
trunk/gcc/testsuite/gfortran.dg/allocate_zerosize_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26017