[ARM,committed] Fix size-optimization-ieee testcase failure

Message ID CAKnkMGu2wuGgZaNx7Y9J4u1bUFsCx5xV6ZQtwJSSV6T=vf5T4w@mail.gmail.com
State New
Headers show
Series
  • [ARM,committed] Fix size-optimization-ieee testcase failure
Related show

Commit Message

Thomas Preudhomme Dec. 21, 2018, 11:50 a.m.
I've committed the obvious attached patch to fix the
gcc.target/arm/size-optimization-ieee-* testcase failures.

On some version of dejagnu, options in RUNTESTFLAGS are appended to the
command-line and thus any -mfloat-abi=softfp or -mfloat-abi=hard in
there overwrite the -mfloat-abi=soft in the dg-options for
size-optimization-ieee-* tests. Test is still run though because
arm_soft_ok returns true if -mfloat-abi=soft is accepted, even if the
file is not compiled for softfloat due to a later -mfloat-abi on the
command line.

This patch adds a dg-skip-if to those tests to ensure they are not run
in softfp or hard mode.

2018-12-21  Thomas Preud'homme  <thomas.preudhomme@linaro.org>

    gcc/testsuite/
    * gcc.target/arm/size-optimization-ieee-1.c: Skip if passing
    -mfloat-abi=softfp or -mfloat-abi=hard.
    * gcc.target/arm/size-optimization-ieee-2.c: Likewise.
    * gcc.target/arm/size-optimization-ieee-3.c: Likewise.

Patch

From c13cca23aa64a07f66c80f14dbdd79c63163783c Mon Sep 17 00:00:00 2001
From: thopre01 <thopre01@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 21 Dec 2018 11:49:04 +0000
Subject: [PATCH] [ARM] Fix size-optimization-ieee testcase failure

On some version of dejagnu, options in RUNTESTFLAGS are appended to the
command-line and thus any -mfloat-abi=softfp or -mfloat-abi=hard in
there overwrite the -mfloat-abi=soft in the dg-options for
size-optimization-ieee-* tests. Test is still run though because
arm_soft_ok returns true if -mfloat-abi=soft is accepted, even if the
file is not compiled for softfloat due to a later -mfloat-abi on the
command line.

This patch adds a dg-skip-if to those tests to ensure they are not run
in softfp or hard mode.

2018-12-21  Thomas Preud'homme  <thomas.preudhomme@linaro.org>

    gcc/testsuite/
    * gcc.target/arm/size-optimization-ieee-1.c: Skip if passing
    -mfloat-abi=softfp or -mfloat-abi=hard.
    * gcc.target/arm/size-optimization-ieee-2.c: Likewise.
    * gcc.target/arm/size-optimization-ieee-3.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267323 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/testsuite/ChangeLog                                 | 7 +++++++
 gcc/testsuite/gcc.target/arm/size-optimization-ieee-1.c | 1 +
 gcc/testsuite/gcc.target/arm/size-optimization-ieee-2.c | 1 +
 gcc/testsuite/gcc.target/arm/size-optimization-ieee-3.c | 1 +
 4 files changed, 10 insertions(+)

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dcac93bb275..1569e7aaa0f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@ 
+2018-12-21  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
+
+	* gcc.target/arm/size-optimization-ieee-1.c: Skip if passing
+	-mfloat-abi=softfp or -mfloat-abi=hard.
+	* gcc.target/arm/size-optimization-ieee-2.c: Likewise.
+	* gcc.target/arm/size-optimization-ieee-3.c: Likewise.
+
 2018-12-21  Jakub Jelinek  <jakub@redhat.com>
 
 	PR target/88547
diff --git a/gcc/testsuite/gcc.target/arm/size-optimization-ieee-1.c b/gcc/testsuite/gcc.target/arm/size-optimization-ieee-1.c
index 34090f20fec..61475eb4c67 100644
--- a/gcc/testsuite/gcc.target/arm/size-optimization-ieee-1.c
+++ b/gcc/testsuite/gcc.target/arm/size-optimization-ieee-1.c
@@ -1,4 +1,5 @@ 
 /* { dg-do link { target arm_soft_ok } } */
+/* { dg-skip-if "Feature is -mfloat-abi=soft only" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */
 /* { dg-options "-mfloat-abi=soft" } */
 
 int
diff --git a/gcc/testsuite/gcc.target/arm/size-optimization-ieee-2.c b/gcc/testsuite/gcc.target/arm/size-optimization-ieee-2.c
index 75337894a9c..b4699271cea 100644
--- a/gcc/testsuite/gcc.target/arm/size-optimization-ieee-2.c
+++ b/gcc/testsuite/gcc.target/arm/size-optimization-ieee-2.c
@@ -1,4 +1,5 @@ 
 /* { dg-do link { target arm_soft_ok } } */
+/* { dg-skip-if "Feature is -mfloat-abi=soft only" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */
 /* { dg-options "-mfloat-abi=soft" } */
 
 int
diff --git a/gcc/testsuite/gcc.target/arm/size-optimization-ieee-3.c b/gcc/testsuite/gcc.target/arm/size-optimization-ieee-3.c
index 63c92b3bbb7..34b1ebe7afd 100644
--- a/gcc/testsuite/gcc.target/arm/size-optimization-ieee-3.c
+++ b/gcc/testsuite/gcc.target/arm/size-optimization-ieee-3.c
@@ -1,4 +1,5 @@ 
 /* { dg-do link { target arm_soft_ok } } */
+/* { dg-skip-if "Feature is -mfloat-abi=soft only" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */
 /* { dg-options "-mfloat-abi=soft" } */
 
 int
-- 
2.19.1