This is the mail archive of the gcc-patches@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]

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


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.


Attachment: pr33593.diff
Description: Binary data


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