[Bug fortran/35719] pointer to zero sized array not associated

tkoenig at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon May 5 18:24:00 GMT 2008



------- 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



More information about the Gcc-bugs mailing list