diff options
author | Tobias Burnus <burnus@net-b.de> | 2006-12-17 19:00:46 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2006-12-17 19:00:46 +0100 |
commit | 2ef73bb4ef051fdcf5e186465fa9bf4f7933f8f3 (patch) | |
tree | 39f2b7d7bf77d42ba808797fd8bbb1632d14e054 /libgfortran | |
parent | 23f351630bf38802005b873256d744c68c39a8ce (diff) | |
download | gcc-2ef73bb4ef051fdcf5e186465fa9bf4f7933f8f3.zip gcc-2ef73bb4ef051fdcf5e186465fa9bf4f7933f8f3.tar.gz gcc-2ef73bb4ef051fdcf5e186465fa9bf4f7933f8f3.tar.bz2 |
associated.c: Check for associated(NULL,NULL).
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).
From-SVN: r119989
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 4 | ||||
-rw-r--r-- | libgfortran/intrinsics/associated.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 0844d1a..ff7adbe 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2006-12-17 Tobias Burnus <burnus@net-b.de> + + * intrinsics/associated.c: Check for associated(NULL,NULL). + 2006-12-15 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/30145 diff --git a/libgfortran/intrinsics/associated.c b/libgfortran/intrinsics/associated.c index 1a05f20..d5ef556 100644 --- a/libgfortran/intrinsics/associated.c +++ b/libgfortran/intrinsics/associated.c @@ -39,6 +39,8 @@ associated (const gfc_array_void *pointer, const gfc_array_void *target) { int n, rank; + if (GFC_DESCRIPTOR_DATA (pointer) == NULL) + return 0; if (GFC_DESCRIPTOR_DATA (pointer) != GFC_DESCRIPTOR_DATA (target)) return 0; if (GFC_DESCRIPTOR_DTYPE (pointer) != GFC_DESCRIPTOR_DTYPE (target)) |