fortran-torture.exp (fortran-torture-execute): Honor additional_flags set by alternat...
authorRichard Henderson <rth@redhat.com>
Mon, 30 Aug 2004 12:13:37 +0000 (05:13 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 30 Aug 2004 12:13:37 +0000 (05:13 -0700)
        * 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
gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_fraction_exponent.x [new file with mode: 0644]
gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x [new file with mode: 0644]
gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_set_exponent.x [new file with mode: 0644]
gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.x [new file with mode: 0644]
gcc/testsuite/lib/fortran-torture.exp

index 193974b986749e46718abb23b31399e5c4ac5a37..175c078f02462e8e710725e92a5821600f6f3a06 100644 (file)
@@ -1,3 +1,13 @@
+2004-08-30  Richard Henderson  <rth@redhat.com>
+
+       * 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  <rth@redhat.com>
 
        * 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 (file)
index 0000000..be755d0
--- /dev/null
@@ -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 (file)
index 0000000..be755d0
--- /dev/null
@@ -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 (file)
index 0000000..be755d0
--- /dev/null
@@ -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 (file)
index 0000000..be755d0
--- /dev/null
@@ -0,0 +1,2 @@
+lappend additional_flags [ieee-options]
+return 0
index c7ecf0e0e683ef53d7c0ba904c7ae2f67bbac7b1..dae028139dd02aaffb0c67329671c70d3c7840a1 100644 (file)
@@ -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"
+    }
+}