From: Sandra Loosemore Date: Sun, 23 Nov 2025 03:29:34 +0000 (+0000) Subject: OpenMP: Fix "begin declare variant" test failure with -m32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2239b33d130c9e08ac760370138c720badc03544;p=thirdparty%2Fgcc.git 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 --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 0f87118d017..08500630261 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. */