This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35719] pointer to zero sized array not associated
- 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: 5 May 2008 18:24:11 -0000
- Subject: [Bug fortran/35719] pointer to zero sized array not associated
- References: <bug-35719-15620@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from tkoenig at gcc dot gnu dot org 2008-05-05 18:24 -------
(In reply to comment #3)
> One possibility is to allocate something for zero-sized arrays, e.g. one
> element. The array bounds ensure than that the program still knows that the
> size of the array is zero. The extra allocation wastes memory, but usually one
> element is quite small and zero-sized arrays are not very common.
I agree in principle; but we could also allocate a single array,
like we do for ALLOCATE.
This is probably the cleanest solution.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35719