This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[fortran,committed] Fix faulty logic in gfc_call_realloc(), PR 33592
- From: FX Coudert <fxcoudert at gmail dot com>
- To: "fortran at gcc dot gnu dot org List" <fortran at gcc dot gnu dot org>
- Cc: gcc-patches list <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 10 Nov 2007 18:01:55 +0000
- Subject: [fortran,committed] Fix faulty logic in gfc_call_realloc(), PR 33592
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:to:message-id:content-type:cc:subject:from:date:x-mailer; bh=kfpQ+i7GpMd30dDbaFDyQzwV/rxJiJjHis3ydR4pBmU=; b=VLy4zJCt//ygWwInUHNKgVZu9iJlIflR05Ii2LOavisJn/XH0VJE4EoD8z3Qsu23wIdZt9Y23TQ1tQvxPJFYGtXJZEAngAm9kCf26RSdpVZJDTv6BKdoiJm80RhT6cZrAem8hbNQL95dlH8bPk+Vrec4aJFhVDoh1AXchtCCKb4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:to:message-id:content-type:cc:subject:from:date:x-mailer; b=tFyfbrqyruZCKN9G7645/WaccZJWuFnwrnHw0TqFVmhR4IlhdWPDQAYTcD8g5WtU9h9IzVWv9hudFtWdHHvzI635ic+bFLlafqIrcwgOwSE4Ag1vu5YI+/ORKkTIVvLZMzV9kAHZoSbr7MgcJq1l5Ddc4IEfEqUs4yW2o4bFjhc=
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