This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/27895] problem with SPREAD and zero-sized arrays



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]