[arm] Fix various tests
authorRichard Earnshaw <rearnsha@arm.com>
Fri, 16 Jun 2017 21:07:20 +0000 (21:07 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Fri, 16 Jun 2017 21:07:20 +0000 (21:07 +0000)
The neon-thumb2-move.c test was overriding the options that had been
detected as being necessary to enable Neon.  The result was that the
combination of the test's options and those auto-detected were not
compatible with neon leading to a test failure.  The correct fix here
is to stick with the options that dg-add-options arm_neon has worked
out.

The thumb2-slow-flash-data tests were relying (incorrectly) on a
particular FPU being enabled by default.  These tests are fixed by
adding +fp to the architecture selected.

* gcc.target/arm/neon-thumb2-move.c (dg-options): Don't override
the architecture options added by dg-add-options arm_neon.
* gcc.target/arm/thumb2-slow-flash-data-2.c (dg-opitions): Add +fp
to the architecture.
* gcc.target/arm/thumb3-slow-flash-data-3.c (dg-opitions): Likewise.
* gcc.target/arm/thumb4-slow-flash-data-3.c (dg-opitions): Likewise.
* gcc.target/arm/thumb5-slow-flash-data-3.c (dg-opitions): Likewise.

From-SVN: r249310

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/neon-thumb2-move.c
gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-2.c
gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-3.c
gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-4.c
gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-5.c

index 53cd676f0c7d2ee8b10af62ff633cf6f7105e2eb..984aa70ea99ec1c4905fd198bbf589ed9aa48881 100644 (file)
@@ -1,3 +1,13 @@
+2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
+
+       * gcc.target/arm/neon-thumb2-move.c (dg-options): Don't override
+       the architecture options added by dg-add-options arm_neon.
+       * gcc.target/arm/thumb2-slow-flash-data-2.c (dg-opitions): Add +fp
+       to the architecture.
+       * gcc.target/arm/thumb3-slow-flash-data-3.c (dg-opitions): Likewise.
+       * gcc.target/arm/thumb4-slow-flash-data-3.c (dg-opitions): Likewise.
+       * gcc.target/arm/thumb5-slow-flash-data-3.c (dg-opitions): Likewise.
+
 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
 
        * gcc.target/arm/multilib.exp (rmprofile): New tests when rm-profile
index 9cf86dd05fe83405de9a817c3967106fdfe72c6c..d8c6748d4ee911c6869083b8811e9ac713a75861 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_neon_ok } */
 /* { dg-require-effective-target arm_thumb2_ok } */
-/* { dg-options "-O2 -mthumb -march=armv7-a" } */
+/* { dg-options "-O2 -mthumb" } */
 /* { dg-add-options arm_neon } */
 /* { dg-prune-output "switch .* conflicts with" } */
 
index 6e76043daeeab51bdac1052edc48502793cf4462..c87e050639d098e8a228dacc8e64efafe9eb4861 100644 (file)
@@ -3,7 +3,7 @@
 /* { dg-require-effective-target arm_thumb2_ok } */
 /* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-m4" "-mcpu=cortex-m7" } } */
 /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
-/* { dg-options "-march=armv7e-m -mfloat-abi=hard -O2 -mthumb -mslow-flash-data" } */
+/* { dg-options "-march=armv7e-m+fp -mfloat-abi=hard -O2 -mthumb -mslow-flash-data" } */
 
 float f (float);
 
index fe7a12bf99b6c0a3cdf1102ecfc018fc5ca0a347..8c6210ee6c9e702da92222b9fe471b3f3bbb3a3b 100644 (file)
@@ -3,7 +3,7 @@
 /* { dg-require-effective-target arm_thumb2_ok } */
 /* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-m4" "-mcpu=cortex-m7" } } */
 /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
-/* { dg-options "-march=armv7e-m -mfloat-abi=hard -mthumb -mslow-flash-data" } */
+/* { dg-options "-march=armv7e-m+fp -mfloat-abi=hard -mthumb -mslow-flash-data" } */
 
 /* From PR71607 */
 
index cc5aea4437f9cb709ffe256cbec8e79c2353773c..1bcb6924ed2aa15ba2b0dc0968cad743322e5147 100644 (file)
@@ -3,7 +3,7 @@
 /* { dg-require-effective-target arm_thumb2_ok } */
 /* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-m4" "-mcpu=cortex-m7" } } */
 /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
-/* { dg-options "-march=armv7e-m -mfloat-abi=hard -O2 -mthumb -mslow-flash-data" } */
+/* { dg-options "-march=armv7e-m+fp -mfloat-abi=hard -O2 -mthumb -mslow-flash-data" } */
 
 double __attribute__ ((target ("fpu=fpv5-d16")))
 foo (void)
index b9161c4a4b4c85cb15c1c88e46b1d92f0bad341d..808fff05faaada2567c9ad02a2ab50ed744d1782 100644 (file)
@@ -3,7 +3,7 @@
 /* { dg-require-effective-target arm_thumb2_ok } */
 /* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-m4" "-mcpu=cortex-m7" } } */
 /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
-/* { dg-options "-march=armv7e-m -mfloat-abi=hard -O2 -mthumb -mslow-flash-data" } */
+/* { dg-options "-march=armv7e-m+fp -mfloat-abi=hard -O2 -mthumb -mslow-flash-data" } */
 
 double __attribute__ ((target ("fpu=fpv5-sp-d16")))
 foo (void)