diff mbox

[ARM] Skip pr59858.c test for -mfloat-abi=hard

Message ID 000001cf28c8$7b2f2050$718d60f0$@bolton@arm.com
State New
Headers show

Commit Message

Ian Bolton Feb. 13, 2014, 2:32 p.m. UTC
Hi,

The pr59858.c testcase explicitly sets -msoft-float which is incompatible
with our -mfloat-abi=hard variant.

This patch therefore should not be run if you have -mfloat-abi=hard.

Tested with both variations for arm-none-eabi build.

OK for commit?

Cheers,
Ian


2014-02-13  Ian Bolton  <ian.bolton@arm.com>

testsuite/
        * gcc.target/arm/pr59858.c: Skip test if -mfloat-abi=hard.

Comments

Richard Earnshaw Feb. 14, 2014, 1:46 p.m. UTC | #1
On 13/02/14 14:32, Ian Bolton wrote:
> Hi,
> 
> The pr59858.c testcase explicitly sets -msoft-float which is incompatible
> with our -mfloat-abi=hard variant.
> 
> This patch therefore should not be run if you have -mfloat-abi=hard.
> 
> Tested with both variations for arm-none-eabi build.
> 
> OK for commit?
> 
> Cheers,
> Ian
> 
> 
> 2014-02-13  Ian Bolton  <ian.bolton@arm.com>
> 
> testsuite/
>         * gcc.target/arm/pr59858.c: Skip test if -mfloat-abi=hard.
> 
> 
> pr59858-skip-if-hard-float-patch-v2.txt
> 
> 
> diff --git a/gcc/testsuite/gcc.target/arm/pr59858.c b/gcc/testsuite/gcc.target/arm/pr59858.c
> index 463bd38..1e03203 100644
> --- a/gcc/testsuite/gcc.target/arm/pr59858.c
> +++ b/gcc/testsuite/gcc.target/arm/pr59858.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-march=armv5te -marm -mthumb-interwork -Wall -Wstrict-prototypes -Wstrict-aliasing -funsigned-char -fno-builtin -fno-asm -msoft-float -std=gnu99 -mlittle-endian -mthumb -fno-stack-protector  -Os -g -feliminate-unused-debug-types -funit-at-a-time -fmerge-all-constants -fstrict-aliasing -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -fPIC -w" } */
> +/* { dg-skip-if "Test is not compatible with hard-float" { *-*-* } { "-mfloat-abi=hard" } { "" } } */
>  
>  typedef enum {
>   REG_ENOSYS = -1,
> 

This won't work if hard-float is the default.  Take a look at the way
other tests check for this.
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.target/arm/pr59858.c b/gcc/testsuite/gcc.target/arm/pr59858.c
index 463bd38..1e03203 100644
--- a/gcc/testsuite/gcc.target/arm/pr59858.c
+++ b/gcc/testsuite/gcc.target/arm/pr59858.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-march=armv5te -marm -mthumb-interwork -Wall -Wstrict-prototypes -Wstrict-aliasing -funsigned-char -fno-builtin -fno-asm -msoft-float -std=gnu99 -mlittle-endian -mthumb -fno-stack-protector  -Os -g -feliminate-unused-debug-types -funit-at-a-time -fmerge-all-constants -fstrict-aliasing -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -fPIC -w" } */
+/* { dg-skip-if "Test is not compatible with hard-float" { *-*-* } { "-mfloat-abi=hard" } { "" } } */
 
 typedef enum {
  REG_ENOSYS = -1,