Re: [Patch, Fortran] PR 51073: fix for zero-sized coarray arrays

2011-11-11 Thread Steve Kargl
On Fri, Nov 11, 2011 at 03:24:45PM +0100, Tobias Burnus wrote: > > The patch does the same we do for nonstatic variables: It allocates a > single byte in this case; as it is done in the front-end and as it is a > compile-time constant, there is no performance problem ;-) What about memory press

[Patch, Fortran] PR 51073: fix for zero-sized coarray arrays

2011-11-11 Thread Tobias Burnus
Dear all, attached one patches for issues found by Joel when testing gfortran on RTEMS. Coarrays with -fcoarray=lib: For zero-sized static ("save") coarray arrays, we should allocate a single byte rather than 0 bytes as "ptr = malloc (0)" might return either NULL or a unique pointer. If it