From 83010c5a1948342d3363d17b268589957e7f31f3 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 30 Aug 2004 05:13:37 -0700 Subject: [PATCH] fortran-torture.exp (fortran-torture-execute): Honor additional_flags set by alternate driver. * lib/fortran-torture.exp (fortran-torture-execute): Honor additional_flags set by alternate driver. (ieee-options): New procedure. * gfortran.fortran-torture/execute/intrinsic_fraction_exponent.x: New. * gfortran.fortran-torture/execute/intrinsic_nearest.x: New. * gfortran.fortran-torture/execute/intrinsic_set_exponent.x: New. * gfortran.fortran-torture/execute/nan_inf_fmt.x: New. From-SVN: r86761 --- gcc/testsuite/ChangeLog | 10 +++++++++ .../execute/intrinsic_fraction_exponent.x | 2 ++ .../execute/intrinsic_nearest.x | 2 ++ .../execute/intrinsic_set_exponent.x | 2 ++ .../execute/nan_inf_fmt.x | 2 ++ gcc/testsuite/lib/fortran-torture.exp | 22 +++++++++++++++++++ 6 files changed, 40 insertions(+) create mode 100644 gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_fraction_exponent.x create mode 100644 gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x create mode 100644 gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_set_exponent.x create mode 100644 gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.x diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 193974b9867..175c078f024 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2004-08-30 Richard Henderson + + * lib/fortran-torture.exp (fortran-torture-execute): Honor + additional_flags set by alternate driver. + (ieee-options): New procedure. + * gfortran.fortran-torture/execute/intrinsic_fraction_exponent.x: New. + * gfortran.fortran-torture/execute/intrinsic_nearest.x: New. + * gfortran.fortran-torture/execute/intrinsic_set_exponent.x: New. + * gfortran.fortran-torture/execute/nan_inf_fmt.x: New. + 2004-08-30 Richard Henderson * lib/f-torture.exp: Remove. diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_fraction_exponent.x b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_fraction_exponent.x new file mode 100644 index 00000000000..be755d03596 --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_fraction_exponent.x @@ -0,0 +1,2 @@ +lappend additional_flags [ieee-options] +return 0 diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x new file mode 100644 index 00000000000..be755d03596 --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x @@ -0,0 +1,2 @@ +lappend additional_flags [ieee-options] +return 0 diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_set_exponent.x b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_set_exponent.x new file mode 100644 index 00000000000..be755d03596 --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_set_exponent.x @@ -0,0 +1,2 @@ +lappend additional_flags [ieee-options] +return 0 diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.x b/gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.x new file mode 100644 index 00000000000..be755d03596 --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.x @@ -0,0 +1,2 @@ +lappend additional_flags [ieee-options] +return 0 diff --git a/gcc/testsuite/lib/fortran-torture.exp b/gcc/testsuite/lib/fortran-torture.exp index c7ecf0e0e68..dae028139dd 100644 --- a/gcc/testsuite/lib/fortran-torture.exp +++ b/gcc/testsuite/lib/fortran-torture.exp @@ -139,6 +139,7 @@ proc fortran-torture-execute { src } { global TORTURE_OPTIONS # Check for alternate driver. + set additional_flags ""; if [file exists [file rootname $src].x] { verbose "Using alternate driver [file rootname [file tail $src]].x" 2 set done_p 0 @@ -184,6 +185,9 @@ proc fortran-torture-execute { src } { set options "" lappend options "additional_flags=-w $option" + if { $additional_flags != "" } { + lappend options "additional_flags=$additional_flags"; + } set comp_output [gfortran_target_compile "$src" "$executable" executable $options]; # See if we got something bad. @@ -341,3 +345,21 @@ proc fortran-torture { args } { } } +# +# ieee-options -- return options necessary for 100% ieee conformance. +# +proc ieee-options { } { + # Ensure that excess precision does not cause problems. + if [istarget "i?86-*-*"] then { + return "-ffloat-store" + } + if [istarget "m68k-*-*"] then { + return "-ffloat-store" + } + + # Enable full IEEE compliance mode. + if { [istarget "alpha*-*-*"] + || [istarget "sh*-*-*"] } then { + return "-mieee" + } +} -- 2.30.2