diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2025-03-26 14:52:19 +0100 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2025-03-26 14:52:19 +0100 |
commit | acc1ea0cbfb125658ca1d7488e5b1e5e3ae3dee2 (patch) | |
tree | 789b79f7c5be7164c65c87b500330269b0356d0a /gcc | |
parent | d402a3911d5eeb4680397458aa31dad4c3f5136e (diff) | |
download | gcc-acc1ea0cbfb125658ca1d7488e5b1e5e3ae3dee2.zip gcc-acc1ea0cbfb125658ca1d7488e5b1e5e3ae3dee2.tar.gz gcc-acc1ea0cbfb125658ca1d7488e5b1e5e3ae3dee2.tar.bz2 |
testsuite: i386: Fix c-c++-common/gomp/metadirective-device.c etc. with i?86 compiler
Two new tests FAIL on both Solaris/x86 and Linux/i686 with a
32-bit-default compiler:
FAIL: c-c++-common/gomp/metadirective-device.c -std=c++17
scan-tree-dump-not optimized "__builtin_GOMP_error"
FAIL: c-c++-common/gomp/metadirective-device.c -std=c++26
scan-tree-dump-not optimized "__builtin_GOMP_error"
FAIL: c-c++-common/gomp/metadirective-device.c -std=c++98
scan-tree-dump-not optimized "__builtin_GOMP_error"
FAIL: c-c++-common/gomp/metadirective-target-device-1.c -std=c++17
scan-tree-dump-times optimized "GOMP_error" 0
FAIL: c-c++-common/gomp/metadirective-target-device-1.c -std=c++26
scan-tree-dump-times optimized "GOMP_error" 0
FAIL: c-c++-common/gomp/metadirective-target-device-1.c -std=c++98
scan-tree-dump-times optimized "GOMP_error" 0
FAIL: c-c++-common/gomp/metadirective-device.c scan-tree-dump-not optimized
"__builtin_GOMP_error"
FAIL: c-c++-common/gomp/metadirective-target-device-1.c
scan-tree-dump-times optimized "GOMP_error" 0
They also FAIL on Linux/x86_64 with -mx32.
The problem is two-fold: restricting a test to target x86_64-*-* is
always wrong: an i?86-*-* compiler can produce 64-bit code with -m64
just as well, so it should always be both.
In addition, the -mx32 failure shows that the test seems to be 64-bit
only.
To fix both issues, this patch uses the new x86 effective-target keyword
and restricts the tests to lp64 instead of ! ia32.
Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu.
2025-03-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/testsuite:
* c-c++-common/gomp/metadirective-device.c
(dg-additional-options): Use on all x86 targets. Restrict to lp64.
* c-c++-common/gomp/metadirective-target-device-1.c: Likewise.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/c-c++-common/gomp/metadirective-device.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-device.c b/gcc/testsuite/c-c++-common/gomp/metadirective-device.c index 3807624..d7f736d 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-device.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-device.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-additional-options "-foffload=disable -fdump-tree-optimized" } */ -/* { dg-additional-options "-DDEVICE_ARCH=x86_64 -DDEVICE_ISA=sse -msse" { target { x86_64-*-* && { ! ia32 } } } } */ +/* { dg-additional-options "-DDEVICE_ARCH=x86_64 -DDEVICE_ISA=sse -msse" { target { x86 && lp64 } } } */ #include <stdlib.h> diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c b/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c index 5d3a4c3..284f35f 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-additional-options "-fdump-tree-optimized" } */ -/* { dg-additional-options "-DDEVICE_ARCH=x86_64 -DDEVICE_ISA=mmx -mmmx" { target { x86_64-*-* && { ! ia32 } } } } */ +/* { dg-additional-options "-DDEVICE_ARCH=x86_64 -DDEVICE_ISA=mmx -mmmx" { target { x86 && lp64 } } } */ #include <stdlib.h> |