From e3e266bfb1eb3e8c10f7461910529e0cb566343d Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Fri, 16 Jun 2017 21:07:20 +0000 Subject: [PATCH] [arm] Fix various tests 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 | 10 ++++++++++ gcc/testsuite/gcc.target/arm/neon-thumb2-move.c | 2 +- .../gcc.target/arm/thumb2-slow-flash-data-2.c | 2 +- .../gcc.target/arm/thumb2-slow-flash-data-3.c | 2 +- .../gcc.target/arm/thumb2-slow-flash-data-4.c | 2 +- .../gcc.target/arm/thumb2-slow-flash-data-5.c | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 53cd676f0c7..984aa70ea99 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2017-06-16 Richard Earnshaw + + * 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 * gcc.target/arm/multilib.exp (rmprofile): New tests when rm-profile diff --git a/gcc/testsuite/gcc.target/arm/neon-thumb2-move.c b/gcc/testsuite/gcc.target/arm/neon-thumb2-move.c index 9cf86dd05fe..d8c6748d4ee 100644 --- a/gcc/testsuite/gcc.target/arm/neon-thumb2-move.c +++ b/gcc/testsuite/gcc.target/arm/neon-thumb2-move.c @@ -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" } */ diff --git a/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-2.c b/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-2.c index 6e76043daee..c87e050639d 100644 --- a/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-2.c +++ b/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-2.c @@ -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); diff --git a/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-3.c b/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-3.c index fe7a12bf99b..8c6210ee6c9 100644 --- a/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-3.c +++ b/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-3.c @@ -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 */ diff --git a/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-4.c b/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-4.c index cc5aea4437f..1bcb6924ed2 100644 --- a/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-4.c +++ b/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-4.c @@ -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) diff --git a/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-5.c b/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-5.c index b9161c4a4b4..808fff05faa 100644 --- a/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-5.c +++ b/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-5.c @@ -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) -- 2.30.2