]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: arm: add -mcpu=unset before -march
authorAlexandre Oliva <oliva@adacore.com>
Sat, 31 Jan 2026 04:52:05 +0000 (01:52 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Sat, 31 Jan 2026 04:54:42 +0000 (01:54 -0300)
Reset the cpu selection to the default on tests that set -march
explicitly instead of using dg-add-options.  The latter would reset
the cpu selection to avoid interference from TOOL_OPTIONS.

Also add +fp to -march in tests that don't override float-abi and fpu,
so that -mfloat-abi=hard -mfpu=auto in TOOL_OPTIONS won't cause a
failure.

for  gcc/testsuite/ChangeLog

* gcc.target/arm/bfloat16_simd_1_2.c: Add -mcpu=unset.
* gcc.target/arm/bfloat16_simd_2_2.c: Likewise.
* gcc.target/arm/bfloat16_simd_3_2.c: Likewise.
* gcc.dg/torture/pr120347.c: Likewise.  Add +fp to -march.

gcc/testsuite/gcc.dg/torture/pr120347.c
gcc/testsuite/gcc.target/arm/bfloat16_simd_1_2.c
gcc/testsuite/gcc.target/arm/bfloat16_simd_2_2.c
gcc/testsuite/gcc.target/arm/bfloat16_simd_3_2.c

index a2d187bbc5c609f9313fb23f298e1d5465cba1af..375a3ec0bc292e4d5e4edb347ee78d6f56c1b0c8 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do assemble } */
-/* { dg-additional-options "-march=armv7-a -mthumb" { target { arm_arch_v7a_ok && arm_thumb2_ok } } } */
+/* { dg-additional-options "-mcpu=unset -march=armv7-a+fp -mthumb" { target { arm_arch_v7a_ok && arm_thumb2_ok } } } */
 
 void *end;
 void **start;
index 95eecec2d0973edc803edd41762f1ea48094f10a..299bd60086b93add220c6bcc9979a660f1dd8051 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-require-effective-target arm_softfp_ok } */
 /* { dg-require-effective-target arm_v8_neon_ok } */
 /* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */
-/* { dg-additional-options "-march=armv8.2-a+bf16 -mfloat-abi=softfp -mfpu=auto" } */
+/* { dg-additional-options "-mcpu=unset -march=armv8.2-a+bf16 -mfloat-abi=softfp -mfpu=auto" } */
 /* { dg-additional-options "-O3 --save-temps -std=gnu90" } */
 /* { dg-final { check-function-bodies "**" "" } } */
 
index 175bfa5c22738dc38382888089385ad53bc4e5c3..9b1ff2780417e89c7dbcdff72faceaf38693fe59 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-require-effective-target arm_softfp_ok } */
 /* { dg-require-effective-target arm_v8_neon_ok } */
 /* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */
-/* { dg-additional-options "-march=armv8.2-a -mfloat-abi=softfp -mfpu=neon-fp-armv8" } */
+/* { dg-additional-options "-mcpu=unset -march=armv8.2-a -mfloat-abi=softfp -mfpu=neon-fp-armv8" } */
 /* { dg-additional-options "-O3 --save-temps -std=gnu90" } */
 /* { dg-final { check-function-bodies "**" "" } } */
 
index 346253b8a47dcd322f74d6bb6b63b45c64acd2ca..ec9f4a0d690b45ced71804ab890b630a4293c332 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-require-effective-target arm_softfp_ok } */
 /* { dg-require-effective-target arm_v8_neon_ok } */
 /* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */
-/* { dg-additional-options "-march=armv8.2-a -mfloat-abi=softfp -mfpu=neon-fp-armv8" } */
+/* { dg-additional-options "-mcpu=unset -march=armv8.2-a -mfloat-abi=softfp -mfpu=neon-fp-armv8" } */
 /* { dg-additional-options "-O3 --save-temps -std=gnu90" } */
 /* { dg-final { check-function-bodies "**" "" } } */