g++.dg/pr112822.C uses altivec vectors explicitly, but it expects this
feature to be enabled by default on targets that recognize the
attribute, which is not a given on older ppc cpus, where the compiler
recommends recompiling with -mvsx.

Since it's just a compilation test, we don't seem to need to test for
e.g. assembler support.

Regstrapped on powerpc64le-linux-gnu.  Also tested with gcc-14 on
x86_64-linux-x-powerpc-elf.  Ok to install?


for  gcc/testsuite/ChangeLog

        PR tree-optimization/112822
        * g++.dg/pr112822.C: Compile with -mvsx on ppc.
---
 gcc/testsuite/g++.dg/pr112822.C |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/testsuite/g++.dg/pr112822.C b/gcc/testsuite/g++.dg/pr112822.C
index a8557522467d7..9ec5707eb4c4d 100644
--- a/gcc/testsuite/g++.dg/pr112822.C
+++ b/gcc/testsuite/g++.dg/pr112822.C
@@ -1,6 +1,8 @@
 /* PR tree-optimization/112822 */
 /* { dg-do compile { target c++17 } } */
 /* { dg-options "-w -O2" } */
+/* Required for altivec double vectors.  */
+/* { dg-additional-options "-mvsx" { target powerpc*-*-* } } */
 
 /* Verify we do not ICE on the following noisy creduced test case.  */
 

-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to