Patchwork Commit: RX: Fix some gcc testsuite failures

login
register
mail settings
Submitter Nick Clifton
Date April 27, 2011, 2:56 p.m.
Message ID <m3ei4n3fpy.fsf@redhat.com>
Download mbox | patch
Permalink /patch/93071/
State New
Headers show

Comments

Nick Clifton - April 27, 2011, 2:56 p.m.
Hi Guys,

  I am applying the patch below to the mainline and 4.6 branch sources.
  It fixes a few GCC testsuite failures for the RX target, specifically:

     gcc.dg/20020312-2.c
     gcc.dg/pr28796-2.c
     gcc.dg/torture/builtin-cproj-1.c
     gcc.dg/torture/type-generic-1.c
     gcc.target/rx/pack.c

Cheers
  Nick

gcc/testsuite/ChangeLog
2011-04-27  Nick Clifton  <nickc@redhat.com>

	* gcc.dg/20020312-2.c: Add definition for RX.

	* lib/target-supports.exp (add_options_for_ieee): Use -mnofpu
	option with RX targets.

	* gcc.target/rx/pack.c: Replace C++ style // comments with C style
	/* */ comments.

Patch

Index: gcc/testsuite/gcc.target/rx/pack.c
===================================================================
--- gcc/testsuite/gcc.target/rx/pack.c	(revision 173012)
+++ gcc/testsuite/gcc.target/rx/pack.c	(working copy)
@@ -4,10 +4,10 @@ 
 
 typedef struct tst_2
 {
-  INT16U	f0;	// [+0]
-  INT16U *	f1;	// [+2]
-  INT16U	f2;	// [+6]
-  INT16U *	f3;	// [+8]
+  INT16U	f0;	/* [+0] */
+  INT16U *	f1;	/* [+2] */
+  INT16U	f2;	/* [+6] */
+  INT16U *	f3;	/* [+8] */
 } __attribute__ ((__packed__)) t2;
 
 #include <stddef.h>
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	(revision 173012)
+++ gcc/testsuite/lib/target-supports.exp	(working copy)
@@ -3556,6 +3556,9 @@ 
          || [istarget "sh*-*-*"] } {
        return "$flags -mieee"
     }
+    if { [istarget "rx-*-*"] } {
+       return "$flags -mnofpu"
+    }
     return $flags
 }
 
Index: gcc/testsuite/gcc.dg/20020312-2.c
===================================================================
--- gcc/testsuite/gcc.dg/20020312-2.c	(revision 173012)
+++ gcc/testsuite/gcc.dg/20020312-2.c	(working copy)
@@ -58,6 +58,8 @@ 
 # else
 #  define PIC_REG  "30"
 # endif
+#elif defined(__RX__)
+/* No pic register.  */
 #elif defined(__s390__)
 # define PIC_REG  "12"
 #elif defined(__sparc__)