This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: *PING* / Re: [Patch, Fortran] Finalize nonallocatables with INTENT(out)
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: fortran at gcc dot gnu dot org, gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 09 Jun 2013 13:35:23 +0200
- Subject: Re: *PING* / Re: [Patch, Fortran] Finalize nonallocatables with INTENT(out)
- References: <51A8D22F dot 6040801 at net-b dot de> <51B049CA dot 80202 at net-b dot de>
Tobias Burnus <burnus@net-b.de> writes:
> --- /dev/null 2013-06-06 09:52:08.544104880 +0200
> +++ gcc/gcc/testsuite/gfortran.dg/finalize_10.f90 2013-06-03 12:32:38.763008261 +0200
> @@ -0,0 +1,39 @@
> +! { dg-do compile }
> +! { dg-options "-fdump-tree-original" }
> +!
> +! PR fortran/37336
> +!
> +! Finalize nonallocatable INTENT(OUT)
> +!
> +module m
> + type t
> + end type t
> + type t2
> + contains
> + final :: fini
> + end type t2
> +contains
> + elemental subroutine fini(var)
> + type(t2), intent(inout) :: var
> + end subroutine fini
> +end module m
> +
> +subroutine foo(x,y,aa,bb)
> + use m
> + class(t), intent(out) :: x(:),y
> + type(t2), intent(out) :: aa(:),bb
> +end subroutine foo
> +
> +! Finalize CLASS + set default init
> +! { dg-final { scan-tree-dump-times "y->_vptr->_final \\(&desc.\[0-9\]+, y->_vptr->_size, 0\\);" 1 "original" } }
> +! { dg-final { scan-tree-dump-times "__builtin_memcpy \\(\\(void .\\) y->_data, \\(void .\\) y->_vptr->_def_init, \\(unsigned long\\) y->_vptr->_size\\);" 1 "original" } }
That doesn't match.
(void) __builtin_memcpy ((void *) y->_data, (void *) y->_vptr->_def_init, (character(kind=4)) y->_vptr->_size);
Appears to be a 32/64 bit issue.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."