[gcc r17-3392] mv28.C: Compile with -march=x86-64

"H.J. Lu via Gcc-cvs" <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:1fb18207ae8aa92c2ef1b1878c1c1a87039685be

commit r17-3392-g1fb18207ae8aa92c2ef1b1878c1c1a87039685be
Author: H.J. Lu <[email protected]>
Date:   Tue Aug 18 13:15:30 2026 +0800

    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]>

Diff:
---
 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 c377d23a4241..3c566668857e 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" } */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.