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
This commit is contained in:
Tobias Burnus 2006-12-17 19:00:46 +01:00 committed by Tobias Burnus
parent 23f351630b
commit 2ef73bb4ef
4 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2006-12-17 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/associated_2.f90: Add test for associated(NULL,NULL).
2006-12-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR middle-end/7651

View File

@ -17,6 +17,8 @@ contains
! the target argument is not present (case (i))
if (.not. associated (b)) call abort ()
deallocate (a)
nullify(a)
if(associated(a,a)) call abort()
allocate (a(2,1,2))
b => a
if (.not.associated (b)) call abort ()

View File

@ -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

View File

@ -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))