This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[Patch,fortran] Make assoicated(null-pointer-to-array,null-pointer-to-array) return .FALSE.
- From: Tobias Burnus <burnus at net-b dot de>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Sun, 17 Dec 2006 14:22:21 +0100
- Subject: [Patch,fortran] Make assoicated(null-pointer-to-array,null-pointer-to-array) return .FALSE.
:ADDPATCH fortran:
This fixes CP2K. Calling
associated(pointer,target)
returned .TRUE., if both pointer and target were NULL.
This patch fixes this in the libgfortran library.
(As I just found out, the same problem exists also for scalars [if
expression added in trans-intrinsic]; this is PR 30238. I don't have the
time too look at it at the moment.)
Regression tested on x86_64-unknown-linux-gnu. Ok for the trunk and gcc
4.2? (Maybe also for 4.1?)
Tobias
2006-12-17 Tobias Burnus <burnus@net-b.de>
* intrinsics/associated.c: Check for associated(NULL,NULL).
2006-12-17 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/associated_2.f90: Add test for associated(NULL,NULL).