diff mbox

[testsuite] Add new check for large reals to support float128 tests in gfortran.dg

Message ID 4D5F2B9E.4040406@frontier.com
State New
Headers show

Commit Message

Jerry DeLisle Feb. 19, 2011, 2:31 a.m. UTC
Hi,

The attached patch, introduced to me by Tobias Burnus, adds a check for large 
real kinds.

This allows the new test case for NANs to be added to the gfortran.dg testsuite.

I have been running this in my tree for some time with the nan test case 
(x86-64).  I would appreciate testing on other platforms.

OK for trunk?

Jerry

2011-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* lib/target-supports.exp (check_effective_target_fortran_large_real)
	New check for large reals.

Comments

Mike Stump Feb. 19, 2011, 5:02 a.m. UTC | #1
On Feb 18, 2011, at 6:31 PM, Jerry DeLisle wrote:
> The attached patch, introduced to me by Tobias Burnus, adds a check for large real kinds.

> OK for trunk?

Ok.  I make no claim on the fortran bits, if you need a fortran review, be sure to ask a fortran person to review it.  I glanced at them, and it all seemed reasonable.
diff mbox

Patch

Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp	(revision 170273)
+++ lib/target-supports.exp	(working copy)
@@ -956,6 +956,22 @@  proc check_effective_target_fortran_large_real { }
     }]
 }
 
+# Return 1 if the target supports Fortran real kind real(16),
+# 0 otherwise. Contrary to check_effective_target_fortran_large_real
+# this checks for Real(16) only; the other returned real(10) if
+# both real(10) and real(16) are available.
+#
+# When the target name changes, replace the cached result.
+
+proc check_effective_target_fortran_real_16 { } {
+    return [check_no_compiler_messages fortran_real_16 executable {
+	! Fortran
+	real(kind=16) :: x
+	x = cos (x)
+	end
+    }]
+}
+
 # Return 1 if the target supports Fortran integer kinds larger than
 # integer(8), 0 otherwise.
 #