This patchs makes us run the main C vect.exp tests twice, once with the normal optimisation options and once with -flto added. It's a simple way of covering the LTO streaming of the new "internal" functions, but it should be useful more generally.
The testsuite runs quickly (even cross), so an extra pass through doesn't have much overhead. Tested on x86_64-linux-gnu and arm-linux-gnueabi. OK to install? Richard gcc/testsuite/ * gcc.dg/vect/vect.exp: Run the main tests twice, one with -flto and once without. Index: gcc/testsuite/gcc.dg/vect/vect.exp =================================================================== --- gcc/testsuite/gcc.dg/vect/vect.exp 2011-04-18 08:47:17.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect.exp 2011-04-18 13:22:53.000000000 +0100 @@ -75,15 +75,16 @@ lappend DEFAULT_VECTCFLAGS "-fdump-tree- lappend VECT_SLP_CFLAGS "-fdump-tree-slp-details" # Main loop. -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]] \ - "" $DEFAULT_VECTCFLAGS -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]] \ - "" $DEFAULT_VECTCFLAGS -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]] \ - "" $DEFAULT_VECTCFLAGS -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]] \ - "" $VECT_SLP_CFLAGS - +foreach flags {"" "-flto"} { + dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]] \ + $flags $DEFAULT_VECTCFLAGS + dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]] \ + $flags $DEFAULT_VECTCFLAGS + dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]] \ + $flags $DEFAULT_VECTCFLAGS + dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]] \ + $flags $VECT_SLP_CFLAGS +} #### Tests with special options global SAVED_DEFAULT_VECTCFLAGS