This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/27895] problem with SPREAD and zero-sized arrays
- From: "fxcoudert 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 Jun 2006 09:24:38 -0000
- Subject: [Bug libfortran/27895] problem with SPREAD and zero-sized arrays
- References: <bug-27895-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2006-06-05 09:24 -------
The problem is in the library. spread_internal rightly understands that the
destination array will have zero-size in one dimension, so the call to
allocation memory for ret->data at line 104:
ret->data = internal_malloc_size (rs * size);
gives NULL into ret->data. I don't remember whether we should actually allocate
one byte of memory for ret->data, or if we should jut let it be NULL and simply
return from the function here.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|fortran |libfortran
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27895