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]: Tests with big arrays on HC11/HC12 (fixup how they are compiled)


Hi!

I've committed this patch on 3_3 and mainline to fix the testsuite for HC11/HC12.

 - 920501-12.c, 920501-4.c and 20010518-2.c define arrays that are
   too large for HC11/HC12 when using 32-bit ints.  These tests can be
   compiled (and PASS) when we use 16-bit ints.  It's necessary to force
   that by passing -mshort (for m6811-* and m6812-* only of course).

 - 980506-1.c also defines arrays that can't compile for HC11/HC12.
   Like xstormy16/h8300 it must not be run.

(tested on m6811-elf with make check-gcc)

Stephane

2003-03-02 Stephane Carrez <stcarrez at nerim dot fr>

	* gcc.c-torture/compile/920501-12.x: New file, must pass -mshort
	for HC11/HC12 (array is too large otherwise).
	* gcc.c-torture/compile/920501-4.x: New file, likewise.
	* gcc.c-torture/compile/20010518-2.x: Likewise.
	* gcc.c-torture/compile/980506-1.x: Don't execute this test on
	HC11/HC12 (array is too large).

Index: gcc.c-torture/compile/920501-12.x
===================================================================
RCS file: gcc.c-torture/compile/920501-12.x
diff -N gcc.c-torture/compile/920501-12.x
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc.c-torture/compile/920501-12.x	2 Mar 2003 22:08:18 -0000
@@ -0,0 +1,6 @@
+# This test fails on HC11/HC12 when it is compiled without -mshort because 
+# the stack arrays are too large.  Force to use 16-bit ints for it.
+if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
+	set options "-mshort"
+}
+return 0
Index: gcc.c-torture/compile/920501-4.x
===================================================================
RCS file: gcc.c-torture/compile/920501-4.x
diff -N gcc.c-torture/compile/920501-4.x
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc.c-torture/compile/920501-4.x	2 Mar 2003 22:08:18 -0000
@@ -0,0 +1,6 @@
+# This test fails on HC11/HC12 when it is compiled without -mshort because 
+# the 'r0' array is too large.  Force to use 16-bit ints for it.
+if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
+	set options "-mshort"
+}
+return 0
Index: gcc.c-torture/compile/20010518-2.x
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20010518-2.x,v
retrieving revision 1.1
diff -u -p -r1.1 20010518-2.x
--- gcc.c-torture/compile/20010518-2.x	29 May 2001 18:59:47 -0000	1.1
+++ gcc.c-torture/compile/20010518-2.x	2 Mar 2003 22:08:18 -0000
@@ -1,2 +1,8 @@
-set options "-S"
+# This test fails on HC11/HC12 when it is compiled without -mshort because 
+# the array is too large (INT_MAX/2 > 64K).  Force to use 16-bit ints for it.
+if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
+	set options "-S -mshort"
+} else {
+	set options "-S"
+}
 return 0
Index: gcc.c-torture/compile/980506-1.x
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/980506-1.x,v
retrieving revision 1.3
diff -u -p -r1.3 980506-1.x
--- gcc.c-torture/compile/980506-1.x	10 Feb 2002 20:37:22 -0000	1.3
+++ gcc.c-torture/compile/980506-1.x	2 Mar 2003 22:08:18 -0000
@@ -7,4 +7,7 @@ if { [istarget "h8300-*-*"] } {
         return 1;
 }
 
+if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
+      return 1
+}
 return 0

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