aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2009-09-01 00:23:27 +0200
committerKaz Kojima <kkojima@gcc.gnu.org>2009-08-31 22:23:27 +0000
commit8ceabd259f51b410d75191c2c5433b4731629e4b (patch)
tree5afcb4d00bb23fdf8e8ecbf2acec587f6aa712ac /gcc
parentf9329c35d72509053c31a8cf6938aa665f1352c1 (diff)
downloadgcc-8ceabd259f51b410d75191c2c5433b4731629e4b.zip
gcc-8ceabd259f51b410d75191c2c5433b4731629e4b.tar.gz
gcc-8ceabd259f51b410d75191c2c5433b4731629e4b.tar.bz2
target-supports.exp (add_options_for_ieee): New procedure.
* lib/target-supports.exp (add_options_for_ieee): New procedure. * g++.dg/cdce3.C: Use dg-add-options ieee. * g++.dg/torture/type-generic-1.C: Likewise. * gcc.c-torture/compile/fix-trunc-mem-1.c: Likewise. * gcc.dg/pr28796-2.c: Likewise. * gcc.dg/torture/builtin-math-7.c: Likewise. * gcc.dg/torture/type-generic-1.c: Likewise. * gfortran.dg/boz_14.f90: Likewise. * gfortran.dg/erf_2.F90: Likewise. * gfortran.dg/init_flag_3.f90: Likewise. * gfortran.dg/init_flag_4.f90: Likewise. * gfortran.dg/init_flag_5.f90: Likewise. * gfortran.dg/integer_exponentiation_1.f90: Likewise. * gfortran.dg/integer_exponentiation_5.F90: Likewise. * gfortran.dg/isnan_1.f90: Likewise. * gfortran.dg/isnan_2.f90: Likewise. * gfortran.dg/maxlocval_2.f90: Likewise. * gfortran.dg/maxlocval_4.f90: Likewise. * gfortran.dg/minlocval_1.f90: Likewise. * gfortran.dg/minlocval_4.f90: Likewise. * gfortran.dg/module_nan.f90: Likewise. * gfortran.dg/namelist_42.f90: Likewise. * gfortran.dg/namelist_43.f90: Likewise. * gfortran.dg/nan_1.f90: Likewise. * gfortran.dg/nan_2.f90: Likewise. * gfortran.dg/nan_3.f90: Likewise. * gfortran.dg/nan_4.f90: Likewise. * gfortran.dg/nan_5.f90: Likewise. * gfortran.dg/nearest_1.f90: Likewise. * gfortran.dg/nearest_2.f90: Likewise. * gfortran.dg/nearest_3.f90: Likewise. * gfortran.dg/pr37243.f: Likewise. * gfortran.dg/real_const_3.f90: Likewise. * gfortran.dg/transfer_simplify_2.f90: Likewise. Co-Authored-By: Kaz Kojima <kkojima@gcc.gnu.org> From-SVN: r151250
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog38
-rw-r--r--gcc/testsuite/g++.dg/cdce3.C15
-rw-r--r--gcc/testsuite/g++.dg/torture/type-generic-1.C2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/fix-trunc-mem-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr28796-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-math-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/type-generic-1.c2
-rw-r--r--gcc/testsuite/gfortran.dg/boz_14.f902
-rw-r--r--gcc/testsuite/gfortran.dg/erf_2.F902
-rw-r--r--gcc/testsuite/gfortran.dg/init_flag_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/init_flag_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/init_flag_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/integer_exponentiation_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/integer_exponentiation_5.F902
-rw-r--r--gcc/testsuite/gfortran.dg/isnan_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/isnan_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/maxlocval_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/maxlocval_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/minlocval_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/minlocval_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_nan.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_42.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_43.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nan_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nan_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nan_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nan_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nan_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nearest_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nearest_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nearest_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr37243.f2
-rw-r--r--gcc/testsuite/gfortran.dg/real_const_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_simplify_2.f902
-rw-r--r--gcc/testsuite/lib/target-supports.exp11
35 files changed, 87 insertions, 41 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ff02594..a91e015 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,41 @@
+2009-08-31 Uros Bizjak <ubizjak@gmail.com>
+ Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * lib/target-supports.exp (add_options_for_ieee): New procedure.
+ * g++.dg/cdce3.C: Use dg-add-options ieee.
+ * g++.dg/torture/type-generic-1.C: Likewise.
+ * gcc.c-torture/compile/fix-trunc-mem-1.c: Likewise.
+ * gcc.dg/pr28796-2.c: Likewise.
+ * gcc.dg/torture/builtin-math-7.c: Likewise.
+ * gcc.dg/torture/type-generic-1.c: Likewise.
+ * gfortran.dg/boz_14.f90: Likewise.
+ * gfortran.dg/erf_2.F90: Likewise.
+ * gfortran.dg/init_flag_3.f90: Likewise.
+ * gfortran.dg/init_flag_4.f90: Likewise.
+ * gfortran.dg/init_flag_5.f90: Likewise.
+ * gfortran.dg/integer_exponentiation_1.f90: Likewise.
+ * gfortran.dg/integer_exponentiation_5.F90: Likewise.
+ * gfortran.dg/isnan_1.f90: Likewise.
+ * gfortran.dg/isnan_2.f90: Likewise.
+ * gfortran.dg/maxlocval_2.f90: Likewise.
+ * gfortran.dg/maxlocval_4.f90: Likewise.
+ * gfortran.dg/minlocval_1.f90: Likewise.
+ * gfortran.dg/minlocval_4.f90: Likewise.
+ * gfortran.dg/module_nan.f90: Likewise.
+ * gfortran.dg/namelist_42.f90: Likewise.
+ * gfortran.dg/namelist_43.f90: Likewise.
+ * gfortran.dg/nan_1.f90: Likewise.
+ * gfortran.dg/nan_2.f90: Likewise.
+ * gfortran.dg/nan_3.f90: Likewise.
+ * gfortran.dg/nan_4.f90: Likewise.
+ * gfortran.dg/nan_5.f90: Likewise.
+ * gfortran.dg/nearest_1.f90: Likewise.
+ * gfortran.dg/nearest_2.f90: Likewise.
+ * gfortran.dg/nearest_3.f90: Likewise.
+ * gfortran.dg/pr37243.f: Likewise.
+ * gfortran.dg/real_const_3.f90: Likewise.
+ * gfortran.dg/transfer_simplify_2.f90: Likewise.
+
2009-08-31 Dodji Seketeli <dodji@redhat.com>
PR debug/30161
diff --git a/gcc/testsuite/g++.dg/cdce3.C b/gcc/testsuite/g++.dg/cdce3.C
index 6756a70..3f05fd2 100644
--- a/gcc/testsuite/g++.dg/cdce3.C
+++ b/gcc/testsuite/g++.dg/cdce3.C
@@ -4,12 +4,12 @@
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -DLARGE_LONG_DOUBLE -lm" { target { {! pow10 } && large_long_double } } } */
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -lm" { target { pow10 && {! large_long_double } } } } */
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" { target { {! pow10 } && {! large_long_double } } } } */
-/* { dg-options "-mieee -O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -DLARGE_LONG_DOUBLE -lm" { target { alpha*-*-* && { pow10 && large_long_double } } } } */
-/* { dg-options "-mieee -O2 -fmath-errno -fdump-tree-cdce-details -DLARGE_LONG_DOUBLE -lm" { target { alpha*-*-* && { {! pow10 } && large_long_double } } } } */
-/* { dg-options "-mieee -O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -lm" { target { alpha*-*-* && { pow10 && {! large_long_double } } } } } */
-/* { dg-options "-mieee -O2 -fmath-errno -fdump-tree-cdce-details -lm" { target { alpha*-*-* && { {! pow10 } && {! large_long_double } } } } } */
-/* { dg-final { scan-tree-dump "cdce3.C:95: note: function call is shrink-wrapped into error conditions\." "cdce" { target { pow10 } } } } */
-/* { dg-final { scan-tree-dump "cdce3.C:96: note: function call is shrink-wrapped into error conditions\." "cdce" { target { pow10 } } } } */
+/* { dg-add-options ieee } */
+/* { dg-final { scan-tree-dump "cdce3.C:92: note: function call is shrink-wrapped into error conditions\." "cdce" { target { pow10 } } } } */
+/* { dg-final { scan-tree-dump "cdce3.C:93: note: function call is shrink-wrapped into error conditions\." "cdce" { target { pow10 } } } } */
+/* { dg-final { scan-tree-dump "cdce3.C:95: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
+/* { dg-final { scan-tree-dump "cdce3.C:96: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
+/* { dg-final { scan-tree-dump "cdce3.C:97: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:98: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:99: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:100: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
@@ -21,9 +21,6 @@
/* { dg-final { scan-tree-dump "cdce3.C:106: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:107: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:108: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
-/* { dg-final { scan-tree-dump "cdce3.C:109: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
-/* { dg-final { scan-tree-dump "cdce3.C:110: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
-/* { dg-final { scan-tree-dump "cdce3.C:111: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { cleanup-tree-dump "cdce" } } */
#include <stdlib.h>
#include <math.h>
diff --git a/gcc/testsuite/g++.dg/torture/type-generic-1.C b/gcc/testsuite/g++.dg/torture/type-generic-1.C
index e9c17c3..4d82592 100644
--- a/gcc/testsuite/g++.dg/torture/type-generic-1.C
+++ b/gcc/testsuite/g++.dg/torture/type-generic-1.C
@@ -2,7 +2,7 @@
without any fast-math flags. */
/* { dg-do run } */
-/* { dg-options "-mieee" { target alpha*-*-* sh*-*-* } } */
+/* { dg-add-options ieee } */
/* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */
#include "../../gcc.dg/tg-tests.h"
diff --git a/gcc/testsuite/gcc.c-torture/compile/fix-trunc-mem-1.c b/gcc/testsuite/gcc.c-torture/compile/fix-trunc-mem-1.c
index 739726d..dbd4282 100644
--- a/gcc/testsuite/gcc.c-torture/compile/fix-trunc-mem-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/fix-trunc-mem-1.c
@@ -1,6 +1,6 @@
/* PR target/14201 */
/* Excercise float -> integer in memory patterns. */
-/* { dg-options "-mieee" { target alpha*-*-* } } */
+/* { dg-add-options ieee } */
void f1 (float v, int *p) { *p = v; }
void f2 (float v, unsigned int*p) { *p = v; }
diff --git a/gcc/testsuite/gcc.dg/pr28796-2.c b/gcc/testsuite/gcc.dg/pr28796-2.c
index 17fd158..f56a5d4 100644
--- a/gcc/testsuite/gcc.dg/pr28796-2.c
+++ b/gcc/testsuite/gcc.dg/pr28796-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -funsafe-math-optimizations -fno-finite-math-only -DUNSAFE" } */
-/* { dg-options "-mieee -O2 -funsafe-math-optimizations -fno-finite-math-only -DUNSAFE" { target alpha*-*-* } } */
+/* { dg-add-options ieee } */
/* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */
#include "tg-tests.h"
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-math-7.c b/gcc/testsuite/gcc.dg/torture/builtin-math-7.c
index eaea86f..edd82e0 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-math-7.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-math-7.c
@@ -6,7 +6,7 @@
/* { dg-do run } */
/* { dg-require-effective-target mpc } */
-/* { dg-options "-mieee" { target sh*-*-* } } */
+/* { dg-add-options ieee } */
extern void link_error(int);
diff --git a/gcc/testsuite/gcc.dg/torture/type-generic-1.c b/gcc/testsuite/gcc.dg/torture/type-generic-1.c
index 96b5d01..add83c0 100644
--- a/gcc/testsuite/gcc.dg/torture/type-generic-1.c
+++ b/gcc/testsuite/gcc.dg/torture/type-generic-1.c
@@ -2,8 +2,8 @@
without any fast-math flags. */
/* { dg-do run } */
-/* { dg-options "-mieee" { target alpha*-*-* sh*-*-* } } */
/* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */
+/* { dg-add-options ieee } */
#include "../tg-tests.h"
diff --git a/gcc/testsuite/gfortran.dg/boz_14.f90 b/gcc/testsuite/gfortran.dg/boz_14.f90
index dd7e58e..1e57178 100644
--- a/gcc/testsuite/gfortran.dg/boz_14.f90
+++ b/gcc/testsuite/gfortran.dg/boz_14.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* } }
+! { dg-add-options ieee }
! PR fortran/36214
! For BOZ-initialization of floats, the precision used to be wrong sometimes.
diff --git a/gcc/testsuite/gfortran.dg/erf_2.F90 b/gcc/testsuite/gfortran.dg/erf_2.F90
index d418d5f..087dfd3 100644
--- a/gcc/testsuite/gfortran.dg/erf_2.F90
+++ b/gcc/testsuite/gfortran.dg/erf_2.F90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-fno-range-check -ffree-line-length-none " }
-! { dg-options "-fno-range-check -ffree-line-length-none -mieee" { target alpha*-*-* } } */
+! { dg-add-options ieee }
!
! Check that simplification functions and runtime library agree on ERF,
! ERFC and ERFC_SCALED.
diff --git a/gcc/testsuite/gfortran.dg/init_flag_3.f90 b/gcc/testsuite/gfortran.dg/init_flag_3.f90
index 4a3fd1e..e442617 100644
--- a/gcc/testsuite/gfortran.dg/init_flag_3.f90
+++ b/gcc/testsuite/gfortran.dg/init_flag_3.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-finit-integer=-1 -finit-logical=false -finit-real=nan" }
-! { dg-options "-finit-integer=-1 -finit-logical=false -finit-real=nan -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
program init_flag_3
diff --git a/gcc/testsuite/gfortran.dg/init_flag_4.f90 b/gcc/testsuite/gfortran.dg/init_flag_4.f90
index 8e1265e..b79ec61f 100644
--- a/gcc/testsuite/gfortran.dg/init_flag_4.f90
+++ b/gcc/testsuite/gfortran.dg/init_flag_4.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-finit-real=inf" }
-! { dg-options "-finit-real=inf -mieee" { target alpha*-*-* } } */
+! { dg-add-options ieee }
program init_flag_4
call real_test
diff --git a/gcc/testsuite/gfortran.dg/init_flag_5.f90 b/gcc/testsuite/gfortran.dg/init_flag_5.f90
index 5531251..54f891f 100644
--- a/gcc/testsuite/gfortran.dg/init_flag_5.f90
+++ b/gcc/testsuite/gfortran.dg/init_flag_5.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-finit-real=-inf" }
-! { dg-options "-finit-real=-inf -mieee" { target alpha*-*-* } } */
+! { dg-add-options ieee }
program init_flag_5
call real_test
diff --git a/gcc/testsuite/gfortran.dg/integer_exponentiation_1.f90 b/gcc/testsuite/gfortran.dg/integer_exponentiation_1.f90
index 77ef84c..4dcb3a4 100644
--- a/gcc/testsuite/gfortran.dg/integer_exponentiation_1.f90
+++ b/gcc/testsuite/gfortran.dg/integer_exponentiation_1.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-pedantic -mieee" { target alpha*-*-* } }
+! { dg-add-options ieee }
! PR 30981 - this used to go into an endless loop during execution.
program test
a = 3.0
diff --git a/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90 b/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
index fe431ba..58c7614 100644
--- a/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
+++ b/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
@@ -1,7 +1,7 @@
! { dg-do run { xfail spu-*-* } }
! FAILs on SPU because of invalid result of 1.0/0.0 inline code
! { dg-options "-fno-range-check" }
-! { dg-options "-fno-range-check -mieee" { target alpha*-*-* } } */
+! { dg-add-options ieee }
module mod_check
implicit none
diff --git a/gcc/testsuite/gfortran.dg/isnan_1.f90 b/gcc/testsuite/gfortran.dg/isnan_1.f90
index 4718743..89e4cd3 100644
--- a/gcc/testsuite/gfortran.dg/isnan_1.f90
+++ b/gcc/testsuite/gfortran.dg/isnan_1.f90
@@ -1,7 +1,7 @@
! Test for the ISNAN intrinsic
!
! { dg-do run }
-! { dg-options "-pedantic-errors -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
implicit none
diff --git a/gcc/testsuite/gfortran.dg/isnan_2.f90 b/gcc/testsuite/gfortran.dg/isnan_2.f90
index fe6e931..455ecef 100644
--- a/gcc/testsuite/gfortran.dg/isnan_2.f90
+++ b/gcc/testsuite/gfortran.dg/isnan_2.f90
@@ -2,7 +2,7 @@
!
! { dg-do run }
! { dg-options "-fno-range-check" }
-! { dg-options "-fno-range-check -pedantic-errors -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
implicit none
diff --git a/gcc/testsuite/gfortran.dg/maxlocval_2.f90 b/gcc/testsuite/gfortran.dg/maxlocval_2.f90
index afbfee0..5f6b913 100644
--- a/gcc/testsuite/gfortran.dg/maxlocval_2.f90
+++ b/gcc/testsuite/gfortran.dg/maxlocval_2.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
real :: a(3), nan, minf, pinf
real, allocatable :: c(:)
diff --git a/gcc/testsuite/gfortran.dg/maxlocval_4.f90 b/gcc/testsuite/gfortran.dg/maxlocval_4.f90
index 8edf535..029abe3 100644
--- a/gcc/testsuite/gfortran.dg/maxlocval_4.f90
+++ b/gcc/testsuite/gfortran.dg/maxlocval_4.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
real :: a(3,3), b(3), nan, minf, pinf, h
logical :: l, l2
diff --git a/gcc/testsuite/gfortran.dg/minlocval_1.f90 b/gcc/testsuite/gfortran.dg/minlocval_1.f90
index b66499a..261cab3 100644
--- a/gcc/testsuite/gfortran.dg/minlocval_1.f90
+++ b/gcc/testsuite/gfortran.dg/minlocval_1.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
real :: a(3), nan, minf, pinf
real, allocatable :: c(:)
diff --git a/gcc/testsuite/gfortran.dg/minlocval_4.f90 b/gcc/testsuite/gfortran.dg/minlocval_4.f90
index 5332e82..c42b019 100644
--- a/gcc/testsuite/gfortran.dg/minlocval_4.f90
+++ b/gcc/testsuite/gfortran.dg/minlocval_4.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
real :: a(3,3), b(3), nan, minf, pinf, h
logical :: l, l2
diff --git a/gcc/testsuite/gfortran.dg/module_nan.f90 b/gcc/testsuite/gfortran.dg/module_nan.f90
index d6db6fb..ed841a8 100644
--- a/gcc/testsuite/gfortran.dg/module_nan.f90
+++ b/gcc/testsuite/gfortran.dg/module_nan.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-fno-range-check" }
-! { dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34318
diff --git a/gcc/testsuite/gfortran.dg/namelist_42.f90 b/gcc/testsuite/gfortran.dg/namelist_42.f90
index 476c119..f15914f 100644
--- a/gcc/testsuite/gfortran.dg/namelist_42.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_42.f90
@@ -1,5 +1,5 @@
! { dg-do run { target fd_truncate } }
-! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34427
diff --git a/gcc/testsuite/gfortran.dg/namelist_43.f90 b/gcc/testsuite/gfortran.dg/namelist_43.f90
index fbfd3d5..d2f077e 100644
--- a/gcc/testsuite/gfortran.dg/namelist_43.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_43.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34427
diff --git a/gcc/testsuite/gfortran.dg/nan_1.f90 b/gcc/testsuite/gfortran.dg/nan_1.f90
index 938c04f..609780d 100644
--- a/gcc/testsuite/gfortran.dg/nan_1.f90
+++ b/gcc/testsuite/gfortran.dg/nan_1.f90
@@ -2,7 +2,7 @@
! as arguments
!
! { dg-do run }
-! { dg-options "-pedantic-errors -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
module aux2
diff --git a/gcc/testsuite/gfortran.dg/nan_2.f90 b/gcc/testsuite/gfortran.dg/nan_2.f90
index 5882fa0..5c821d6 100644
--- a/gcc/testsuite/gfortran.dg/nan_2.f90
+++ b/gcc/testsuite/gfortran.dg/nan_2.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-fno-range-check -pedantic" }
-! { dg-options "-fno-range-check -pedantic -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34333
diff --git a/gcc/testsuite/gfortran.dg/nan_3.f90 b/gcc/testsuite/gfortran.dg/nan_3.f90
index 018608b..0a46fdb 100644
--- a/gcc/testsuite/gfortran.dg/nan_3.f90
+++ b/gcc/testsuite/gfortran.dg/nan_3.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-fno-range-check" }
-! { dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34319
diff --git a/gcc/testsuite/gfortran.dg/nan_4.f90 b/gcc/testsuite/gfortran.dg/nan_4.f90
index 09c887e..30e2a49 100644
--- a/gcc/testsuite/gfortran.dg/nan_4.f90
+++ b/gcc/testsuite/gfortran.dg/nan_4.f90
@@ -1,6 +1,6 @@
! { dg-do compile }
! { dg-options "-std=gnu" }
-! { dg-options "-std=gnu -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34398.
diff --git a/gcc/testsuite/gfortran.dg/nan_5.f90 b/gcc/testsuite/gfortran.dg/nan_5.f90
index 64886be..be1169d 100644
--- a/gcc/testsuite/gfortran.dg/nan_5.f90
+++ b/gcc/testsuite/gfortran.dg/nan_5.f90
@@ -3,7 +3,7 @@
! { dg-do compile }
!
! { dg-options "-fno-range-check" }
-! { dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
implicit none
diff --git a/gcc/testsuite/gfortran.dg/nearest_1.f90 b/gcc/testsuite/gfortran.dg/nearest_1.f90
index a38f259..ae9e75f 100644
--- a/gcc/testsuite/gfortran.dg/nearest_1.f90
+++ b/gcc/testsuite/gfortran.dg/nearest_1.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-O0 -ffloat-store" }
-! { dg-options "-O0 -ffloat-store -mieee" { target alpha*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "Denormals not supported" { spu-*-* } { "*" } { "" } }
! PR fortran/27021
! Original code submitted by Dominique d'Humieres
diff --git a/gcc/testsuite/gfortran.dg/nearest_2.f90 b/gcc/testsuite/gfortran.dg/nearest_2.f90
index 8bb4768..c597741 100644
--- a/gcc/testsuite/gfortran.dg/nearest_2.f90
+++ b/gcc/testsuite/gfortran.dg/nearest_2.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-fno-range-check" }
-! { dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
!
! PR fortran/34192
!
diff --git a/gcc/testsuite/gfortran.dg/nearest_3.f90 b/gcc/testsuite/gfortran.dg/nearest_3.f90
index b2bb7e3..7d68316 100644
--- a/gcc/testsuite/gfortran.dg/nearest_3.f90
+++ b/gcc/testsuite/gfortran.dg/nearest_3.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-pedantic-errors -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34209
diff --git a/gcc/testsuite/gfortran.dg/pr37243.f b/gcc/testsuite/gfortran.dg/pr37243.f
index 7322323..01ec0bd 100644
--- a/gcc/testsuite/gfortran.dg/pr37243.f
+++ b/gcc/testsuite/gfortran.dg/pr37243.f
@@ -1,6 +1,6 @@
! PR rtl-optimization/37243
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* } }
+! { dg-add-options ieee }
! Check if register allocator handles IR flattening correctly.
SUBROUTINE SCHMD(V,M,N,LDV)
IMPLICIT DOUBLE PRECISION(A-H,O-Z)
diff --git a/gcc/testsuite/gfortran.dg/real_const_3.f90 b/gcc/testsuite/gfortran.dg/real_const_3.f90
index 6567ac7..f428750 100644
--- a/gcc/testsuite/gfortran.dg/real_const_3.f90
+++ b/gcc/testsuite/gfortran.dg/real_const_3.f90
@@ -1,6 +1,6 @@
!{ dg-do run }
!{ dg-options "-fno-range-check" }
-!{ dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+!{ dg-add-options ieee }
!{ dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
! PR19310 and PR19904, allow disabling range check during compile.
! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
diff --git a/gcc/testsuite/gfortran.dg/transfer_simplify_2.f90 b/gcc/testsuite/gfortran.dg/transfer_simplify_2.f90
index dbad84e..46052d0 100644
--- a/gcc/testsuite/gfortran.dg/transfer_simplify_2.f90
+++ b/gcc/testsuite/gfortran.dg/transfer_simplify_2.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-O2" }
-! { dg-options "-O2 -mieee" { target alpha*-*-* } }
+! { dg-add-options ieee }
! Tests the fix for the meta-bug PR31237 (TRANSFER intrinsic)
! Exercises gfc_simplify_transfer a random walk through types and shapes
! and compares its results with the middle-end version that operates on
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 76624ad..b3b0156 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2971,6 +2971,17 @@ proc add_options_for_c99_runtime { flags } {
return $flags
}
+# Add to FLAGS all the target-specific flags needed to enable
+# full IEEE compliance mode.
+
+proc add_options_for_ieee { flags } {
+ if { [istarget "alpha*-*-*"]
+ || [istarget "sh*-*-*"] } {
+ return "$flags -mieee"
+ }
+ return $flags
+}
+
# Return 1 if the target provides a full C99 runtime.
proc check_effective_target_c99_runtime { } {