https://gcc.gnu.org/g:2239b33d130c9e08ac760370138c720badc03544

commit r16-5525-g2239b33d130c9e08ac760370138c720badc03544
Author: Sandra Loosemore <[email protected]>
Date:   Sun Nov 23 03:29:34 2025 +0000

    OpenMP: Fix "begin declare variant" test failure with -m32
    
    As reported by Haochen Jiang, this recently-added test case was
    failing on x86_64 with -m32; the target hook for matching the "arch"
    selector won't match "x86_64" in that case, even if gcc was configured
    for that target.  It does match plain "x86" for both 64 and 32 bit targets,
    so I've switched the testcase to use that instead.
    
    Committed as obvious (at least in retrospect).
    
    gcc/testsuite/ChangeLog
            * c-c++-common/gomp/delim-declare-variant-6.c (f3): Use "x86"
            instead of "x86_64" in the arch selector, to match both 64- and
            32-bit targets.

Diff:
---
 gcc/testsuite/c-c++-common/gomp/delim-declare-variant-6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/c-c++-common/gomp/delim-declare-variant-6.c 
b/gcc/testsuite/c-c++-common/gomp/delim-declare-variant-6.c
index 0f87118d0176..085006302613 100644
--- a/gcc/testsuite/c-c++-common/gomp/delim-declare-variant-6.c
+++ b/gcc/testsuite/c-c++-common/gomp/delim-declare-variant-6.c
@@ -36,12 +36,12 @@ int f2 (int x) { return -x; }
 /* Check that non-duplicate traits are collected from both inner and outer.  */
 
 #pragma omp begin declare variant match (device={kind("host")})
-#pragma omp begin declare variant match (device={arch("x86_64")})
+#pragma omp begin declare variant match (device={arch("x86")})
 int f3 (int x) { return -x; }
 #pragma omp end declare variant
 #pragma omp end declare variant
 /* { dg-final { scan-tree-dump "f3\\.ompvariant.*kind \\(.host.\\)" "gimple" } 
} */
-/* { dg-final { scan-tree-dump "f3\\.ompvariant.*arch \\(.x86_64.\\)" "gimple" 
} } */
+/* { dg-final { scan-tree-dump "f3\\.ompvariant.*arch \\(.x86.\\)" "gimple" } 
} */
 
 /* Check that traits for construct selectors merge as expected.  */

Reply via email to