diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-05-09 20:59:05 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-05-09 20:59:05 +0200 |
commit | e02b5683e77c2b4317b23be72e43b6e6cc6c8e5b (patch) | |
tree | dd3e489f88bcbfba4828073041c35d2c5dd521db /gcc | |
parent | bc5afdf14ccf8375f7fb3de2be1121aaf550f8aa (diff) | |
download | gcc-e02b5683e77c2b4317b23be72e43b6e6cc6c8e5b.zip gcc-e02b5683e77c2b4317b23be72e43b6e6cc6c8e5b.tar.gz gcc-e02b5683e77c2b4317b23be72e43b6e6cc6c8e5b.tar.bz2 |
testsuite: Fix up pr84508* tests [PR84508]
The tests FAIL on x86_64-linux with
/usr/bin/ld: cannot find -lubsan
collect2: error: ld returned 1 exit status
compiler exited with status 1
FAIL: gcc.target/i386/pr84508-1.c (test for excess errors)
Excess errors:
/usr/bin/ld: cannot find -lubsan
The problem is that only *.dg/ubsan/ubsan.exp calls ubsan_init
which adds the needed search paths to libubsan library.
So, link/run tests for -fsanitize=undefined need to go into
gcc.dg/ubsan/ or g++.dg/ubsan/, even when they are target specific.
2024-05-09 Jakub Jelinek <jakub@redhat.com>
PR target/84508
* gcc.target/i386/pr84508-1.c: Move to ...
* gcc.dg/ubsan/pr84508-1.c: ... here. Restrict to i?86/x86_64
non-ia32 targets.
* gcc.target/i386/pr84508-2.c: Move to ...
* gcc.dg/ubsan/pr84508-2.c: ... here. Restrict to i?86/x86_64
non-ia32 targets.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.dg/ubsan/pr84508-1.c (renamed from gcc/testsuite/gcc.target/i386/pr84508-1.c) | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/ubsan/pr84508-2.c (renamed from gcc/testsuite/gcc.target/i386/pr84508-2.c) | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr84508-1.c b/gcc/testsuite/gcc.dg/ubsan/pr84508-1.c index bb3e28d..d78dddd 100644 --- a/gcc/testsuite/gcc.target/i386/pr84508-1.c +++ b/gcc/testsuite/gcc.dg/ubsan/pr84508-1.c @@ -1,5 +1,6 @@ -/* { dg-do run { target { ! ia32 } } } */ +/* { dg-do run { target { { i?86-*-* x86_64-*-* } && { ! ia32 } } } } */ /* { dg-options "-fsanitize=undefined" } */ + #include <emmintrin.h> int main() diff --git a/gcc/testsuite/gcc.target/i386/pr84508-2.c b/gcc/testsuite/gcc.dg/ubsan/pr84508-2.c index 32a8f20..cf9c7db 100644 --- a/gcc/testsuite/gcc.target/i386/pr84508-2.c +++ b/gcc/testsuite/gcc.dg/ubsan/pr84508-2.c @@ -1,5 +1,6 @@ -/* { dg-do run { target { ! ia32 } } } */ +/* { dg-do run { target { { i?86-*-* x86_64-*-* } && { ! ia32 } } } } */ /* { dg-options "-fsanitize=undefined" } */ + #include <emmintrin.h> int main() |