On Fri, Jun 26, 2015 at 06:03:34PM +0100, James Greenhalgh wrote:
> --- /dev/null
> +++ b/gcc/testsuite/g++.dg/pr66119.C

I think generally testcases shouldn't be added into g++.dg/ directly,
but subdirectories.  So g++.dg/opt/ ?

> @@ -0,0 +1,69 @@
> +/* PR66119 - MOVE_RATIO is not constant in a compiler run, so Scalar
> +   Reduction of Aggregates must ask the back-end more than once what
> +   the value of MOVE_RATIO now is.  */
> +
> +/* { dg-do compile  { target i?86-*-* x86_64-*-* } }  */

In g++.dg/, dejagnu cycles through all 3 major -std=c* versions,
thus using -std=c++11 is inappropriate.
If the test requires c++11, instead you do
// { dg-do compile { target { { i?86-*-* x86_64-*-* } && c++11 } } }

> +/* { dg-options "-std=c++11 -O3 -mavx -fdump-tree-sra -march=slm" { target 
> avx_runtime } } */

and remove -std=c++11 here.  I don't see any point in guarding it with
avx_runtime, after all, if not avx_runtime, the test will be compiled with
-O0 and thus very likely fail the scan-tree-dump test.
As it is dg-do compile test only, you have no dependency on assembler nor
linker nor runtime.
But I'd add -mtune=slm too.

        Jakub

Reply via email to