[VxWorks] Fix failures in ieee.exp

Richard Sandiford richard@codesourcery.com
Thu Mar 8 09:23:00 GMT 2007


The ieee/fp-cmp-[123].c tests fail for VxWorks kernel mode because
signal.h can't be included without vxWorks.h.  ieee/hugeval.c fails
for VxWorks kernel mode for the same reason that it fails on HPUX;
HUGEVAL is defined to DBL_MAX instead of infinity.

Tested on i586-vxworks.  OK to install?

Richard


gcc/testsuite/
	* gcc.c-torture/execute/ieee/fp-cmp-1.c: Include vxWorks.h
	on VxWorks targets.
	* gcc.c-torture/execute/ieee/fp-cmp-2.c: Likewise.
	* gcc.c-torture/execute/ieee/fp-cmp-3.c: Likewise.
	* gcc.c-torture/execute/ieee/hugeval.x: XFAIL for VxWorks kernel
	mode.

Index: gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.c	(revision 122656)
+++ gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.c	(working copy)
@@ -1,3 +1,9 @@
+/* On VxWorks, the kernel version of <signal.h> includes sigevent.h,
+   which in turn needs a definition of RESULT.  However, neither header
+   brings in a definition of RESULT.  */
+#ifdef __vxworks
+#include <vxWorks.h>
+#endif
 #include <signal.h>
 
 double dnan = 1.0/0.0 - 1.0/0.0;
Index: gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c	(revision 122656)
+++ gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c	(working copy)
@@ -1,3 +1,9 @@
+/* On VxWorks, the kernel version of <signal.h> includes sigevent.h,
+   which in turn needs a definition of RESULT.  However, neither header
+   brings in a definition of RESULT.  */
+#ifdef __vxworks
+#include <vxWorks.h>
+#endif
 #include <signal.h>
 
 float fnan = 1.0f/0.0f - 1.0f/0.0f;
Index: gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c	(revision 122656)
+++ gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c	(working copy)
@@ -1,3 +1,9 @@
+/* On VxWorks, the kernel version of <signal.h> includes sigevent.h,
+   which in turn needs a definition of RESULT.  However, neither header
+   brings in a definition of RESULT.  */
+#ifdef __vxworks
+#include <vxWorks.h>
+#endif
 #include <signal.h>
 
 long double dnan = 1.0l/0.0l - 1.0l/0.0l;
Index: gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.x
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.x	(revision 122656)
+++ gcc/testsuite/gcc.c-torture/execute/ieee/hugeval.x	(working copy)
@@ -6,5 +6,18 @@ if { [istarget "hppa*-*-hpux9*"] || [ist
       set torture_execute_xfail "$target_triplet"
 }
 
+# VxWorks kernel mode has the same problem.
+if {[istarget "*-*-vxworks*"]} {
+    set torture_eval_before_execute {
+	global compiler_conditional_xfail_data
+	set compiler_conditional_xfail_data {
+	    "The kernel HUGE_VAL is defined to DBL_MAX instead of +Inf."
+	    { "*-*-*" }
+	    {}
+	    { "-mrtp" }
+	}
+    }
+}
+
 return 0
 



More information about the Gcc-patches mailing list