mv28.C has
void __attribute__ ((target("avx512vl"))) foo () {} /* { dg-error "ISA
'\[^\n\r\]*' is not supported in 'target' attribute, use 'arch='
syntax" } */
...
to check for unsupported target attribute errors. If AVX512 is enabled
by default, there are no expected compiler errors. Compile mv28.C with
-march=x86-64 so that AVX512 isn't enabled on AVX512 machines when GCC
is configured with
--with-arch=native --with-cpu=native
PR testsuite/126923
* g++.target/i386/mv28.C (dg-additional-options): New.
--
H.J.
From 0865e3a75af0b5549d177ca16036d46c4186759f Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <[email protected]>
Date: Tue, 18 Aug 2026 13:15:30 +0800
Subject: [PATCH] mv28.C: Compile with -march=x86-64
mv28.C has
void __attribute__ ((target("avx512vl"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
...
to check for unsupported target attribute errors. If AVX512 is enabled
by default, there are no expected compiler errors. Compile mv28.C with
-march=x86-64 so that AVX512 isn't enabled on AVX512 machines when GCC
is configured with
--with-arch=native --with-cpu=native
PR testsuite/126923
* g++.target/i386/mv28.C (dg-additional-options): New.
Signed-off-by: H.J. Lu <[email protected]>
---
gcc/testsuite/g++.target/i386/mv28.C | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/testsuite/g++.target/i386/mv28.C b/gcc/testsuite/g++.target/i386/mv28.C
index c377d23a424..3c566668857 100644
--- a/gcc/testsuite/g++.target/i386/mv28.C
+++ b/gcc/testsuite/g++.target/i386/mv28.C
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-require-ifunc "" } */
+/* { dg-additional-options "-march=x86-64" } */
void __attribute__ ((target("avx512vl"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
void __attribute__ ((target("avx512bw"))) foo () {} /* { dg-error "ISA '\[^\n\r\]*' is not supported in 'target' attribute, use 'arch=' syntax" } */
--
2.55.0