testsuite: fix arm/pure-code/no-literal-pool-* tests
authorChristophe Lyon <christophe.lyon@linaro.org>
Wed, 4 Nov 2020 09:33:42 +0000 (09:33 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Wed, 4 Nov 2020 09:39:14 +0000 (09:39 +0000)
Add -mfloat-abi=soft and skip the tests if -mfloat-abi=hard is
supplied.

This avoids failures when testing with overridden flags such as
mthumb/-mcpu=cortex-m4/-mfloat-abi=hard

2020-11-04  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/testsuite/
* gcc.target/arm/pure-code/no-literal-pool-m0.c: Add dg-skip-if
and -mfloat-abi=soft option.
* gcc.target/arm/pure-code/no-literal-pool-m23.c: Likewise.

gcc/testsuite/gcc.target/arm/pure-code/no-literal-pool-m0.c
gcc/testsuite/gcc.target/arm/pure-code/no-literal-pool-m23.c

index 787a61a125da5ba53463a47f271c0e032f3a1439..bd6f4af183b22fb339fb3674e9514c9eff54a2ba 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-mpure-code -mcpu=cortex-m0 -march=armv6s-m -mthumb" } */
+/* { dg-skip-if "skip override" { *-*-* } { "-mfloat-abi=hard" } { "" } } */
+/* { dg-options "-mpure-code -mcpu=cortex-m0 -march=armv6s-m -mthumb -mfloat-abi=soft" } */
 /* { dg-final { check-function-bodies "**" "" } } */
 
 /* Does not use thumb1_gen_const_int.
index 67d63d26bb190f5e57e6ce4208a29840b68a6d17..95370126ce8b488d9ad4ed4a797c31f3191c6f60 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-mpure-code -mcpu=cortex-m23 -march=armv8-m.base -mthumb" } */
+/* { dg-skip-if "skip override" { *-*-* } { "-mfloat-abi=hard" } { "" } } */
+/* { dg-options "-mpure-code -mcpu=cortex-m23 -march=armv8-m.base -mthumb -mfloat-abi=soft" } */
 /* { dg-final { check-function-bodies "**" "" } } */
 
 /*