Require powerpc_vsx_ok in gcc.target/powerpc/pr71763.c
authorDouglas Rupp <rupp@adacore.com>
Mon, 18 May 2020 18:43:48 +0000 (11:43 -0700)
committerJoel Brobecker <brobecker@adacore.com>
Mon, 18 May 2020 18:43:48 +0000 (11:43 -0700)
We're getting an error when running this test on PowerPC VxWorks 7,
due to an unexpected warning:

    | Excess errors:
    | cc1: warning: '-mvsx' and '-mno-altivec' are incompatible

The warning comes from a combination of factors:
  - The test itself uses -mvsx explicitly via the following directive:
       // { dg-options "-O1 -mvsx" }
  - Our toolchain was configured so as to make -mno-altivec
    the default;
  - These two options are mutually exclusive.

This commit adds a powerpc_vsx_ok dg-require-effective-target directive
to that test, and thus making it UNSUPPORTED instead.

Tested on PowerPC VxWorks 7. Also tested on PowerPC ELF as well,
a platform where we do not make -mno-altivec the default, to verify
that the test continues to run as usual in that case.

gcc/testsuite/

        * gcc.target/powerpc/pr71763.c: Require powerpc_vsx_ok.

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/pr71763.c

index 858eb60..ad5b28d 100644 (file)
@@ -1,3 +1,7 @@
+2020-05-18  Doug Rupp  <rupp@adacore.com>
+
+       * gcc.target/powerpc/pr71763.c: Require powerpc_vsx_ok.
+
 2020-05-18  Harald Anlauf  <anlauf@gmx.de>
 
        PR fortran/95053
index b36ddfa..b888839 100644 (file)
@@ -1,5 +1,6 @@
 // PR target/71763
 // { dg-do compile }
+// { dg-require-effective-target powerpc_vsx_ok }
 // { dg-options "-O1 -mvsx" }
 
 int a, b;