This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] testsuite: xfail gfortran tests for broken cplxf arg


I'd appreciate an OK by a gfortran maintainer.

This patch marks some gfortran tests as XFAIL if libm on the test system
was built with a version of GCC that did not have a fix to pass complex
floats according to the PowerPC-64 ELF ABI.

This does some new things to the gfortran test suites by making available
the checks in lib/target-supports.exp, and by setting up XFAIL flags for
torture tests via .x files as is done in C torture tests.

Tested with -m32 and -m64 on powerpc64-unknown-linux-gnu, on a system
with an incompatible libm and one with a compatible libm; OK for mainline?

2005-02-11  Janis Johnson  <janis187@us.ibm.com>

	* gfortran.fortran-torture/execute/execute.exp: Load
	target-supports.exp.
	* gfortran.dg/f77/cabs.f: XFAIL for broken_cplxf_arg.
	* gfortran.fortran-torture/execute/power.x: New.
	* gfortran.fortran-torture/execute/intrinsic_abs.x: New

Index: gcc/testsuite/gfortran.fortran-torture/execute/execute.exp
===================================================================
RCS file: /opt/gcc-cvs/gcc/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp,v
retrieving revision 1.2
diff -u -p -r1.2 execute.exp
--- gcc/testsuite/gfortran.fortran-torture/execute/execute.exp	13 May 2004 06:40:53 -0000	1.2
+++ gcc/testsuite/gfortran.fortran-torture/execute/execute.exp	4 Feb 2005 19:31:02 -0000
@@ -27,6 +27,7 @@ if $tracelevel then {
 
 # load support procs
 load_lib fortran-torture.exp
+load_lib target-supports.exp
 
 foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f]] {
     # If we're only testing specific files and this isn't one of them, skip it.
Index: gcc/testsuite/gfortran.dg/g77/cabs.f
===================================================================
RCS file: /opt/gcc-cvs/gcc/gcc/testsuite/gfortran.dg/g77/cabs.f,v
retrieving revision 1.2
diff -u -p -r1.2 cabs.f
--- gcc/testsuite/gfortran.dg/g77/cabs.f	2 Aug 2004 06:00:55 -0000	1.2
+++ gcc/testsuite/gfortran.dg/g77/cabs.f	10 Feb 2005 18:55:54 -0000
@@ -1,4 +1,4 @@
-c { dg-do run { xfail mips-sgi-irix6* } } PR 16292
+c { dg-do run { xfail { mips-sgi-irix6* || { powerpc64*-*-linux* && broken_cplxf_arg } } } } PR 16292
       program cabs_1
       complex      z0
       real         r0
--- /dev/null	2004-06-24 11:06:20.000000000 -0700
+++ gcc/testsuite/gfortran.fortran-torture/execute/power.x	2005-02-10 11:10:32.000000000 -0800
@@ -0,0 +1,17 @@
+# GCC 3.4.0 fixed an ABI bug for how complex floats are passed as arguments
+# on powerpc64-linux.  If libm on the test system was built with an earlier
+# compiler then the test will fail.
+
+if [is-effective-target broken_cplxf_arg] {
+    set torture_eval_before_execute {
+	global compiler_conditional_xfail_data
+	set compiler_conditional_xfail_data {
+	    "incompatible libm due to ABI breakage" \
+	    "*-*-*" \
+	    { "*" } \
+	    { "" }
+	}    
+    }
+}
+
+return 0
--- /dev/null	2004-06-24 11:06:20.000000000 -0700
+++ gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_abs.x	2005-02-10 11:10:48.000000000 -0800
@@ -0,0 +1,17 @@
+# GCC 3.4.0 fixed an ABI bug for how complex floats are passed as arguments
+# on powerpc64-linux.  If libm on the test system was built with an earlier
+# compiler then the test will fail.
+
+if [is-effective-target broken_cplxf_arg] {
+    set torture_eval_before_execute {
+	global compiler_conditional_xfail_data
+	set compiler_conditional_xfail_data {
+	    "incompatible libm due to ABI breakage" \
+	    "*-*-*" \
+	    { "*" } \
+	    { "" }
+	}    
+    }
+}
+
+return 0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]