From: Uros Bizjak Date: Mon, 31 Aug 2009 22:23:27 +0000 (+0200) Subject: target-supports.exp (add_options_for_ieee): New procedure. X-Git-Tag: releases/gcc-4.5.0~3761 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ceabd259f51b410d75191c2c5433b4731629e4b;p=thirdparty%2Fgcc.git 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 From-SVN: r151250 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ff0259480420..a91e015c0979 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,41 @@ +2009-08-31 Uros Bizjak + Kaz Kojima + + * 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 PR debug/30161 diff --git a/gcc/testsuite/g++.dg/cdce3.C b/gcc/testsuite/g++.dg/cdce3.C index 6756a7008123..3f05fd2e1d8f 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 #include diff --git a/gcc/testsuite/g++.dg/torture/type-generic-1.C b/gcc/testsuite/g++.dg/torture/type-generic-1.C index e9c17c328e79..4d82592aff6b 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 739726db92bc..dbd4282592c7 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 17fd1584dde5..f56a5d4a4449 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 eaea86fd7327..edd82e032fa6 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 96b5d01e5f64..add83c098151 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 dd7e58e7c2c9..1e571780eeee 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 d418d5fccb90..087dfd38e19b 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 4a3fd1eb3067..e4426177ab60 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 8e1265e9347b..b79ec61f1157 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 5531251b00fc..54f891f49e8d 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 77ef84c2e926..4dcb3a44cd51 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 fe431ba14e9f..58c7614d514e 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 47187432bf27..89e4cd35ba29 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 fe6e9314613a..455ecef1f7a8 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 afbfee030fe3..5f6b913b0f4c 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 8edf5357c317..029abe3d1a7b 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 b66499afca90..261cab346a93 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 5332e823a7e0..c42b01944213 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 d6db6fb054b6..ed841a891ab6 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 476c1196caae..f15914ff1175 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 fbfd3d5e69d5..d2f077e9c48f 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 938c04f004d4..609780d69d16 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 5882fa0888e2..5c821d6513e2 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 018608b50033..0a46fdb6ce4e 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 09c887e17f27..30e2a49480df 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 64886bed0cff..be1169d93d18 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 a38f25985cab..ae9e75f1e8f2 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 8bb47687015d..c5977415bc3c 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 b2bb7e3e5b90..7d6831670050 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 7322323d2c55..01ec0bdf8861 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 6567ac74f630..f428750ed0df 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 diff --git a/gcc/testsuite/gfortran.dg/transfer_simplify_2.f90 b/gcc/testsuite/gfortran.dg/transfer_simplify_2.f90 index dbad84e1ae1e..46052d0a0ecb 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 76624adcd794..b3b0156ae876 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 { } {