Hi,
The gcc.target/aarch64/_Float16_*.c tests fail if we are testing with
-mcpu= option which is not an armv8.2-a processor. This is because
independent of the order -mcpu=/-march= options, -mcpu= overrides the
-march= option.
Committed as obvious after testing on aarch64-linux-gnu with
"--target_board=unix/\{,-mcpu=thunderx,-mcpu=thunderx2t99,-march=armv8-a,-march=armv8.1-a,-march=armv8.2-a\}".
Thanks,
Andrew Pinski
ChangeLog:
* gcc.target/aarch64/_Float16_1.c: Skip if supplied a -mcpu= option.
* gcc.target/aarch64/_Float16_2.c: Likewise
* gcc.target/aarch64/_Float16_3.c: Likewise.
Index: testsuite/gcc.target/aarch64/_Float16_1.c
===================================================================
--- testsuite/gcc.target/aarch64/_Float16_1.c (revision 250901)
+++ testsuite/gcc.target/aarch64/_Float16_1.c (working copy)
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -march=armv8.2-a+nofp16" } */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */
#pragma GCC target ("arch=armv8.2-a+nofp16")
Index: testsuite/gcc.target/aarch64/_Float16_2.c
===================================================================
--- testsuite/gcc.target/aarch64/_Float16_2.c (revision 250901)
+++ testsuite/gcc.target/aarch64/_Float16_2.c (working copy)
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -march=armv8.2-a+nofp16 -fpermitted-flt-eval-methods=c11"
} */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */
#pragma GCC target ("arch=armv8.2-a+nofp16")
Index: testsuite/gcc.target/aarch64/_Float16_3.c
===================================================================
--- testsuite/gcc.target/aarch64/_Float16_3.c (revision 250901)
+++ testsuite/gcc.target/aarch64/_Float16_3.c (working copy)
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -march=armv8.2-a+nofp16 -std=c11 -ffp-contract=fast" } */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */
#pragma GCC target ("arch=armv8.2-a+nofp16")