diff options
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)) |