This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [testsuite, fortran] Increase gfortran.dg/cray_pointers_2.f90 timeout
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Fri, 14 Jan 2011 18:47:14 +0100
- Subject: Re: [testsuite, fortran] Increase gfortran.dg/cray_pointers_2.f90 timeout
- References: <ydd7he87lks.fsf@manam.CeBiTec.Uni-Bielefeld.DE> <4D2F39E6.6010107@net-b.de>
Tobias Burnus <burnus@net-b.de> writes:
>> Unless the patch can be simplified somewhat to reduce the compilation
>> time, I'd like to install the following patch on trunk, 4.4 and 4.5
>> branches.
>
> I think reducing the test itself is not really an option. What would help
> is to run it only once - and not several times with different
> options. That's a test case which should work with all options if it works
> with -O3. However, I have no idea how to convince DejaGNU to compile/run
> this particular test case only once.
I've found a way, but it isn't pretty:
gcc/testsuite/lib/gfortran-dg.exp (gfortran-dg-runtest) has this
snippet:
# look if this is dg-do-run test, in which case
# we cycle through the option list, otherwise we don't
if [expr [search_for $test "dg-do run"]] {
set option_list $torture_with_loops
} else {
set option_list [list { -O } ]
}
Since I've found no part of the gfortran testsuite that doesn't cycle
through optimization options, the following hack makes use of the code
above: it puts two spaces between dg-do and run, thus avoiding the loop.
You have been warned!
Anyway, it works, tested by the appropriate runtest invocation on
i386-pc-solaris2.11.
Ok for mainline and branches?
Rainer
2011-01-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gfortran.dg/cray_pointers_2.f90: Avoid cycling through
optimization options.
diff -r 6c184227ca86 gcc/testsuite/gfortran.dg/cray_pointers_2.f90
--- a/gcc/testsuite/gfortran.dg/cray_pointers_2.f90 Fri Jan 14 10:25:46 2011 +0100
+++ b/gcc/testsuite/gfortran.dg/cray_pointers_2.f90 Fri Jan 14 18:42:56 2011 +0100
@@ -1,5 +1,7 @@
-! { dg-do run }
-! { dg-options "-fcray-pointer -fbounds-check -fno-inline" }
+! Using two spaces between dg-do and run is a hack to keep gfortran-dg-runtest
+! from cycling through optimization options for this expensive test.
+! { dg-do run }
+! { dg-options "-O3 -fcray-pointer -fbounds-check -fno-inline" }
! { dg-timeout-factor 4 }
!
! Series of routines for testing a Cray pointer implementation
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University