[fortran,committed] Fix faulty logic in gfc_call_realloc(), PR 33592

FX Coudert fxcoudert@gmail.com
Sat Nov 10 19:05:00 GMT 2007


Attached patch was committed as obvious after bootstrap and  
regtesting on x86_64-linux. It fixes the logic in gfc_call_realloc(),  
where the code we emitted didn't match the expected code logic  
(indicated in a comment): we checked for (size == 0) instead of  
(size != 0). This only showed up on platforms where realloc(NULL, 0)  
returns NULL, such as hppa-hpux, where it would lead to a runtime  
failure of gfortran.dg/ array_constructor_11.f90.


2007-11-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

        PR fortran/33592
        * trans.c (gfc_call_realloc): Fix the logic and rename  
variables.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr33593.diff
Type: application/octet-stream
Size: 2016 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071110/23691ee9/attachment.obj>


More information about the Fortran mailing list