[Patch,fortran] Make assoicated(null-pointer-to-scalar,null-pointer-to-scalar) return .FALSE. (PR30238)

Tobias Burnus burnus@net-b.de
Sun Dec 17 19:09:00 GMT 2006


:ADDPATCH fortran:

Fixes
    assoicated(null-pointer-to-scalar,null-pointer-to-scalar)
contrary to the patch before, this is for scalars (in
trans-intrinsics.c), before it was for arrays (libgfortran).

Changing trans-intrinsic.c was easier than I thought. Result for a
simple test case
(integer, pointer :: i; nullify(i); if(associated(i,i)) call abort()), now:

  int4 * i;
  _gfortran_set_std (70, 127, 0);
  i = 0B;
  if (i == i && i != 0B)
    {
      _gfortran_abort ();
    }



Regtested x86_64-unknown-linux-gnu.
Ok for trunk and 4.2?

Tobias


2006-12-17  Tobias Burnus  <burnus@net-b.de>

	PR fortran/39238
	* trans-intrinsic.c: Check for associated(NULL,NULL).

2006-12-17  Tobias Burnus  <burnus@net-b.de>

	PR fortran/39238
	* gfortran.dg/associated_1.f90: Add test for associated(NULL,NULL).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: associated2.diff
Type: text/x-patch
Size: 1190 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061217/dde9fdd2/attachment.bin>


More information about the Fortran mailing list