Patchwork *PING* / Re: [Patch, Fortran] Finalize nonallocatables with INTENT(out)

login
register
mail settings
Submitter Dominique Dhumieres
Date June 9, 2013, 10:46 a.m.
Message ID <20130609104620.A97DF3BE1B@mailhost.lps.ens.fr>
Download mbox | patch
Permalink /patch/250024/
State New
Headers show

Comments

Dominique Dhumieres - June 9, 2013, 10:46 a.m.
Dear Tobias,

The test gfortran.dg/finalize_10.f90 fails in 32 bit mode (see
http://gcc.gnu.org/ml/gcc-testresults/2013-06/msg00842.html
FAIL: gfortran.dg/finalize_10.f90  -O   scan-tree-dump-times original "__builtin_memcpy \\\\(\\\\(void .\\\\) y->_data, \\\\(void .\\\\) y->_vptr->_def_init, \\\\(unsigned long\\\\) y->_vptr->_size\\\\);" 1)
because "unsigned long" is replaced with "unsigned int".

The following patch fixes it

I have tried to weaken the test by not using any target and using a regexp
of the kind "(int|long)", but I did not succeeded.

CAVEAT: I don't know if the targets work for x32.

TIA

Dominique

Patch

--- ../_clean/gcc/testsuite/gfortran.dg/finalize_10.f90	2013-06-08 21:50:32.000000000 +0200
+++ gcc/testsuite/gfortran.dg/finalize_10.f90	2013-06-09 11:33:12.000000000 +0200
@@ -26,7 +26,8 @@  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" } }
+! { dg-final { scan-tree-dump-times "__builtin_memcpy \\(\\(void .\\) y->_data, \\(void .\\) y->_vptr->_def_init, \\(unsigned long\\) y->_vptr->_size\\);" 1 "original" { target lp64 } } }
+! { dg-final { scan-tree-dump-times "__builtin_memcpy \\(\\(void .\\) y->_data, \\(void .\\) y->_vptr->_def_init, \\(unsigned int\\) y->_vptr->_size\\);" 1 "original" { target ilp32 } } }
 ! { dg-final { scan-tree-dump-times "x->_vptr->_final \\(&x->_data, x->_vptr->_size, 0\\);" 1 "original" } }
 ! { dg-final { scan-tree-dump-times "x->_vptr->_copy \\(x->_vptr->_def_init, &x->_data\\);" 1 "original" } }