[patch] new dg-effective-target(s) for >= 32 bits, plus testcase patches

DJ Delorie dj@redhat.com
Thu Apr 13 19:55:00 GMT 2006


> Leave out the procs that are never used, it's easy enough to recreate
> them later if they are needed.  

Done.

> Add a comment before each of the new procs, instead of comments that
> cover groups of procs.

Done.

> OK with the changes requested above, and after checking that each
> xfail represents a failure and not something that should be skipped.

I think I have it right now.  I left in XFAILs for a few testcases
where I think the testcase is wrong (malloc takes a size_t, not a
long, for example - on m32c they're different sizes), but skipped all
the other tests where assumptions on int/size/pointer sizes preclude
passing on m32c.

2006-04-13  DJ Delorie  <dj@redhat.com>

	* lib/target-supports.exp (check_effective_target_int32plus): New.
	(check_effective_target_ptr32plus): New.
	(check_effective_target_size32plus): New.
	(check_effective_target_int16): New.
	(check_profiling_available): Add m32c to the list of unsupported targets.

	* gcc.c-torture/compile/20000804-1.c: Skip m32c also.
	* gcc.c-torture/compile/20001226-1.c: Skip m32c due to small
	memory size.
	* gcc.c-torture/compile/20010327-1.c: Skip m32c due to non-SI
	pointers.
	* gcc.c-torture/compile/20020604-1.c: Skip m32c due to small
	size_t.
	* gcc.c-torture/compile/20050303-1.c: Require >=32 bit integers
	and size_t.
	* gcc.c-torture/compile/980506-1.c: Require >=32 bit size_t.
	* gcc.c-torture/execute/20020404-1.x: Check for any 16 bit target,
	not just xstormy16.  Skip m32c due to weird pointer size.
	* gcc.c-torture/execute/20021024-1.x: Check for any 16 bit target,
	not just xstormy16.
	* gcc.c-torture/execute/shiftdi.x: Check for any 16 bit target,
	not just xstormy16.
	* gcc.dg/20020312-2.c: Add m32c support.
	* gcc.dg/20040622-2.c: Require >=32 bit pointers.
	* gcc.dg/20050321-1.c: XFail m32c due to incorrect malloc prototype
	in test.
	* gcc.dg/20050321-2.c: Require >=32 bit integers.
	* gcc.dg/asm-1.c: Skip if int and short are the same size.
	* gcc.dg/fold-mod-1.c: Require >=32 bit integers.
	* gcc.dg/fold-overflow-1.c: Skip m32c due to small const types in asm.
	* gcc.dg/format/bitfld-1.c: Require >=32 bit integers due to printf formats
	* gcc.dg/init-string-2.c: Require >=32 bit integers.
	* gcc.dg/max-1.c: Skip m32c in r8c or m16c mode due to small pointers.
	* gcc.dg/noncompile/920923-1.c: Skip small-int message for int16 hosts.
	* gcc.dg/pch/struct-1.c: Require >= 32 bit integers.
	* gcc.dg/pr14796-2.c: Require >=32 bit integers.
	* gcc.dg/pr17112-1.c: Require >=32 bit integers.
	* gcc.dg/pr18241-1.c: XFail m32c due to incorrect memset prototype
	in test.
	* gcc.dg/pr18241-2.c: XFail m32c due to incorrect memset prototype
	in test.
	* gcc.dg/pr19340.c: Skip m32c due to lack of scheduling.
	* gcc.dg/pr23049.c: Require >=32 bit integers.
	* gcc.dg/torture/pr26565.c: Skip m32c as everything is already packed.
	* gcc.dg/torture/pr26587.c: Require >=32 bit integers.
	* gcc.dg/torture/pr26630.c: Require >=32 bit integers.
	* gcc.dg/tree-ssa/loop-10.c: Require >=32 bit integers.
	* gcc.dg/tree-ssa/loop-2.c: Require >=32 bit size_t.
	* gcc.dg/tree-ssa/loop-4.c: Require >=32 bit size_t.
	* gcc.dg/tree-ssa/ltrans-1.c: Require >=32 bit size_t.
	* gcc.dg/tree-ssa/ltrans-2.c: Require >=32 bit size_t.
	* gcc.dg/tree-ssa/ltrans-3.c: Require >=32 bit size_t.
	* gcc.dg/tree-ssa/ltrans-4.c: Require >=32 bit size_t.
	* gcc.dg/tree-ssa/pr14341.c: Require >=32 bit integers.
	* gcc.dg/tree-ssa/pr23382.c: XFail m32c due to incorrect malloc
	prototype in test.
	* gcc.dg/tree-ssa/pr24627.c: Require >=32 bit integers.
	* gcc.dg/tree-ssa/pr26180.c: Require >=32 bit integers.
	* gcc.dg/tree-ssa/vrp14.c: Require >=32 bit integers.
	* gcc.dg/tree-ssa/vrp21.c: Require >=32 bit integers.
	* gcc.dg/tree-ssa/vrp22.c: Require >=32 bit integers.
	
	* gcc.c-torture/execute/20040629-1.x: New.  Require >16 bit integers.
	* gcc.c-torture/execute/20040703-1.x: Likewise.
	* gcc.c-torture/execute/20040705-1.x: Likewise.
	* gcc.c-torture/execute/20040705-2.x: Likewise.
	* gcc.c-torture/execute/20040709-1.x: Likewise.
	* gcc.c-torture/execute/20040709-2.x: Likewise.
	* gcc.c-torture/execute/20040811-1.x: Likewise.
	* gcc.c-torture/execute/20050316-1.x: Likewise.
	* gcc.c-torture/execute/bitfld-4.x: Likewise.
	* gcc.c-torture/execute/pr19689.x: Likewise.
	* gcc.c-torture/execute/pr7284-1.x: Likewise.
	* gcc.c-torture/execute/usmul.x: Likewise.
	* gcc.c-torture/execute/vrp-5.x: Likewise.
	* gcc.c-torture/execute/vrp-6.x: Likewise.
	* gcc.dg/debug/20041023-1.s: Likewise.

Index: gcc.c-torture/compile/20000804-1.c
===================================================================
--- gcc.c-torture/compile/20000804-1.c	(revision 112898)
+++ gcc.c-torture/compile/20000804-1.c	(working copy)
@@ -2,6 +2,7 @@
    statement to force a 'long long' (64-bits) to go in a register.  */
 /* { dg-do assemble { xfail m6811-*-* m6812-*-* h8300-*-* } } */
 /* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && ilp32 } { "-fpic" "-fPIC" } { "" } } */
+/* { dg-skip-if "No 64-bit registers" { m32c-*-* } { } { } } */
 
 /* Copyright (C) 2000, 2003 Free Software Foundation */
 __complex__ long long f ()
Index: gcc.c-torture/compile/20001226-1.c
===================================================================
--- gcc.c-torture/compile/20001226-1.c	(revision 112898)
+++ gcc.c-torture/compile/20001226-1.c	(working copy)
@@ -2,6 +2,7 @@
    than 64K.  */
 /* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
 /* { dg-xfail-if "jump beyond 128K not supported" "xtensa-*-*" "-O0" "" } */
+/* { dg-skip-if "" { m32c-*-* } { } { "" } } */
 
 /* This testcase exposed two branch shortening bugs on powerpc.  */
 
Index: gcc.c-torture/compile/20010327-1.c
===================================================================
--- gcc.c-torture/compile/20010327-1.c	(revision 112898)
+++ gcc.c-torture/compile/20010327-1.c	(working copy)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "non-SI pointers" { m32c-*-* } { } { } } */
+
 /* This testcase tests whether GCC can produce static initialized data
    that references addresses of size 'unsigned long', even if that's not
    the same as __SIZE_TYPE__.  (See 20011114-1.c for the same test of
@@ -5,5 +7,6 @@
 
    Some rare environments might not have the required relocs to support
    this; they should have this test disabled in the .x file.  */
+
 extern void _text;
 static unsigned long x = (unsigned long) &_text - 0x10000000L - 1;
Index: gcc.c-torture/compile/20020604-1.c
===================================================================
--- gcc.c-torture/compile/20020604-1.c	(revision 112898)
+++ gcc.c-torture/compile/20020604-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* The array is too big. */
 /* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
 /* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
+/* { dg-skip-if "" { m32c-*-* } { } { } } */
 
 /* PR c/6957
    This testcase ICEd at -O2 on IA-32, because
Index: gcc.c-torture/compile/20050303-1.c
===================================================================
--- gcc.c-torture/compile/20050303-1.c	(revision 112898)
+++ gcc.c-torture/compile/20050303-1.c	(working copy)
@@ -1,3 +1,6 @@
+/* { dg-require-effective-target int32plus } */
+/* { dg-require-effective-target size32plus } */
+
 void crc()
 {
     int  toread;
Index: gcc.c-torture/compile/980506-1.c
===================================================================
--- gcc.c-torture/compile/980506-1.c	(revision 112898)
+++ gcc.c-torture/compile/980506-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* The arrays are too large for the xstormy16 - won't fit in 16 bits. */
 /* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
 /* { dg-do assemble { xfail xstormy16-*-* m6811-*-* m6812-*-* } } */
+/* { dg-require-effective-target size32plus } */
 
 unsigned char	TIFFFax2DMode[20][256];
 unsigned char	TIFFFax2DNextState[20][256];
Index: gcc.c-torture/execute/20020404-1.x
===================================================================
--- gcc.c-torture/execute/20020404-1.x	(revision 112898)
+++ gcc.c-torture/execute/20020404-1.x	(working copy)
@@ -1,7 +1,15 @@
-# 16-bit "int"
-if { [istarget "xstormy16-*"] } {
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
 	return 1
 }
 
+# m32c pointers can be 24 bits in a 32 bit variable, so the test
+# patterns may get truncated.
+if { [istarget "m32c-*-*"] } {
+	return 1
+}
+
+
 return 0
 
Index: gcc.c-torture/execute/20021024-1.x
===================================================================
--- gcc.c-torture/execute/20021024-1.x	(revision 112898)
+++ gcc.c-torture/execute/20021024-1.x	(working copy)
@@ -1,7 +1,7 @@
-# 16-bit "int"
-if { [istarget "xstormy16-*"] } {
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
 	return 1
 }
 
-return 0
-
+return 0;
Index: gcc.c-torture/execute/20040629-1.x
===================================================================
--- gcc.c-torture/execute/20040629-1.x	(revision 0)
+++ gcc.c-torture/execute/20040629-1.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/20040703-1.x
===================================================================
--- gcc.c-torture/execute/20040703-1.x	(revision 0)
+++ gcc.c-torture/execute/20040703-1.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/20040705-1.x
===================================================================
--- gcc.c-torture/execute/20040705-1.x	(revision 0)
+++ gcc.c-torture/execute/20040705-1.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/20040705-2.x
===================================================================
--- gcc.c-torture/execute/20040705-2.x	(revision 0)
+++ gcc.c-torture/execute/20040705-2.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/20040709-1.x
===================================================================
--- gcc.c-torture/execute/20040709-1.x	(revision 0)
+++ gcc.c-torture/execute/20040709-1.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/20040709-2.x
===================================================================
--- gcc.c-torture/execute/20040709-2.x	(revision 0)
+++ gcc.c-torture/execute/20040709-2.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/20040811-1.x
===================================================================
--- gcc.c-torture/execute/20040811-1.x	(revision 0)
+++ gcc.c-torture/execute/20040811-1.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/20050316-1.x
===================================================================
--- gcc.c-torture/execute/20050316-1.x	(revision 0)
+++ gcc.c-torture/execute/20050316-1.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/bitfld-4.x
===================================================================
--- gcc.c-torture/execute/bitfld-4.x	(revision 0)
+++ gcc.c-torture/execute/bitfld-4.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/pr19689.x
===================================================================
--- gcc.c-torture/execute/pr19689.x	(revision 0)
+++ gcc.c-torture/execute/pr19689.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/pr7284-1.x
===================================================================
--- gcc.c-torture/execute/pr7284-1.x	(revision 0)
+++ gcc.c-torture/execute/pr7284-1.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/shiftdi.x
===================================================================
--- gcc.c-torture/execute/shiftdi.x	(revision 112898)
+++ gcc.c-torture/execute/shiftdi.x	(working copy)
@@ -1,7 +1,7 @@
-# 16-bit "int"
-if { [istarget "xstormy16-*"] } {
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
 	return 1
 }
 
-return 0
-
+return 0;
Index: gcc.c-torture/execute/usmul.x
===================================================================
--- gcc.c-torture/execute/usmul.x	(revision 0)
+++ gcc.c-torture/execute/usmul.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/vrp-5.x
===================================================================
--- gcc.c-torture/execute/vrp-5.x	(revision 0)
+++ gcc.c-torture/execute/vrp-5.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/vrp-6.x
===================================================================
--- gcc.c-torture/execute/vrp-6.x	(revision 0)
+++ gcc.c-torture/execute/vrp-6.x	(revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.dg/20020312-2.c
===================================================================
--- gcc.dg/20020312-2.c	(revision 112898)
+++ gcc.dg/20020312-2.c	(working copy)
@@ -70,6 +70,8 @@ extern void abort (void);
 # define PIC_REG  "r12"
 #elif defined(__x86_64__)
 /* No pic register.  */
+#elif defined(__m32c__)
+/* No pic register.  */
 #else
 # error "Modify the test for your target."
 #endif
Index: gcc.dg/20040622-2.c
===================================================================
--- gcc.dg/20040622-2.c	(revision 112898)
+++ gcc.dg/20040622-2.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do link } */
+/* { dg-require-effective-target ptr32plus } */
 /* This validates codegen for [r1+32760] on Darwin. */
 void f(char x[32688], double *y, double *z) __attribute__((noinline));
 void f(char x[32688], double *y, double *z) {}
Index: gcc.dg/20050321-1.c
===================================================================
--- gcc.dg/20050321-1.c	(revision 112898)
+++ gcc.dg/20050321-1.c	(working copy)
@@ -1,3 +1,5 @@
+/* malloc doesn't take a long. */
+/* { dg-xfail-if "" { "m32c-*-*" } "*" "" } */
 /* This caused an ICE on powerpc-linux-gnu due to not 
    up-to-date life info (PR middle-end/20177).  */
 
Index: gcc.dg/20050321-2.c
===================================================================
--- gcc.dg/20050321-2.c	(revision 112898)
+++ gcc.dg/20050321-2.c	(working copy)
@@ -6,6 +6,7 @@
 /* { dg-do link { target fpic } } */
 /* { dg-options "-g1 -fpic" } */
 /* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
+/* { dg-require-effective-target int32plus } */
 
 #define A(n) \
   case n##1: return n##1 * 131 + 63;	\
Index: gcc.dg/asm-1.c
===================================================================
--- gcc.dg/asm-1.c	(revision 112898)
+++ gcc.dg/asm-1.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target int32plus } */
 
 struct x {
   int selector;
Index: gcc.dg/fold-mod-1.c
===================================================================
--- gcc.dg/fold-mod-1.c	(revision 112898)
+++ gcc.dg/fold-mod-1.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target int32plus } */
 /* { dg-options "-fdump-tree-gimple" } */
 
 #define ABS(x) (x > 0 ? x : -x)
Index: gcc.dg/fold-overflow-1.c
===================================================================
--- gcc.dg/fold-overflow-1.c	(revision 112898)
+++ gcc.dg/fold-overflow-1.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-compile } */
+/* { dg-skip-if "consts are shorts, not longs" { "m32c-*-*" } { } { } } */
 /* { dg-options "-O -ftrapping-math" } */
 
 /* There should be exactly 2 +Inf in the assembly file.  */
Index: gcc.dg/format/bitfld-1.c
===================================================================
--- gcc.dg/format/bitfld-1.c	(revision 112898)
+++ gcc.dg/format/bitfld-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-options "-std=gnu99 -Wformat" } */
+/* { dg-require-effective-target int32plus } */
 
 #include "format.h"
 
@@ -28,8 +29,12 @@ foo (void)
   printf ("%d%u", x.s15, x.s15);
   printf ("%d%u", x.u16, x.u16);
   printf ("%d%u", x.s16, x.s16);
+#if __INT_MAX__ > 32767
+  /* If integers are 16 bits, there doesn't seem to be a way of
+     printing these without getting an error.  */
   printf ("%d%u", x.u31, x.u31);
   printf ("%d%u", x.s31, x.s31);
+#endif
 #if __LONG_MAX__ > 2147483647 && __INT_MAX__ >= 2147483647
   /* If long is wider than 32 bits, the 32-bit bit-fields are int or
      unsigned int or promote to those types.  Otherwise, long is 32
Index: gcc.dg/init-string-2.c
===================================================================
--- gcc.dg/init-string-2.c	(revision 112898)
+++ gcc.dg/init-string-2.c	(working copy)
@@ -5,6 +5,7 @@
    relevant circumstances can be obtained portably; may still fail if
    char, short and int do not all have distinct precisions.  */
 /* { dg-do compile } */
+/* { dg-require-effective-target int32plus } */
 /* { dg-options "-std=c99 -pedantic-errors -fshort-enums -fshort-wchar" } */
 
 #include <limits.h>
Index: gcc.dg/max-1.c
===================================================================
--- gcc.dg/max-1.c	(revision 112898)
+++ gcc.dg/max-1.c	(working copy)
@@ -2,6 +2,8 @@
 /* Test case reduced by Andrew Pinski <pinskia@physics.uc.edu> */
 /* { dg-do run } */
 /* { dg-options "-O1 -fno-tree-lrs" } */
+/* m32c has varying sized pointers */
+/* { dg-skip-if "" { "m32c-*-*" } "" { "-mcpu=m32c" "-mcpu=m32cm" } } */
 
 extern void abort (void);
 
Index: gcc.dg/noncompile/920923-1.c
===================================================================
--- gcc.dg/noncompile/920923-1.c	(revision 112898)
+++ gcc.dg/noncompile/920923-1.c	(working copy)
@@ -115,7 +115,7 @@ init_mem()
 			  "mem_hash != (prec_t)0", 370, "b.c"),
 		0)));
      flush_hash(mem_hash, 32);
-     build_ptables(mem_base, 1024*(1<<13)); /* { dg-bogus "integer overflow" "int smaller than 32 bits" } */
+     build_ptables(mem_base, 1024*(1<<13)); /* { dg-bogus "integer overflow" "int smaller than 32 bits" { xfail int16 } } */
 }
 
 struct tm {
Index: gcc.dg/pch/struct-1.c
===================================================================
--- gcc.dg/pch/struct-1.c	(revision 112898)
+++ gcc.dg/pch/struct-1.c	(working copy)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
 #include "struct-1.h"
 
 struct ChainSearchRecord {
Index: gcc.dg/pr14796-2.c
===================================================================
--- gcc.dg/pr14796-2.c	(revision 112898)
+++ gcc.dg/pr14796-2.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target int32plus } */
 /* { dg-options "-fdump-tree-gimple" } */
 
 int f (int a) {
Index: gcc.dg/pr17112-1.c
===================================================================
--- gcc.dg/pr17112-1.c	(revision 112898)
+++ gcc.dg/pr17112-1.c	(working copy)
@@ -1,5 +1,6 @@
 /* PR middle-end/17112 */
 /* { dg-do run } */
+/* { dg-require-effective-target int32plus } */
 /* { dg-options "-O2" } */
 
 extern void abort(void);
Index: gcc.dg/pr18241-1.c
===================================================================
--- gcc.dg/pr18241-1.c	(revision 112898)
+++ gcc.dg/pr18241-1.c	(working copy)
@@ -1,4 +1,6 @@
 /* { dg-do run } */
+/* memset doesn't take unsigned long */
+/* { dg-xfail-if "" { "m32c-*-*" } "*" "" } */
 /* { dg-options "-std=gnu99 -Wall -Wextra -O1" } */ 
 
 extern void *memset (void*, int, unsigned long);
Index: gcc.dg/pr18241-2.c
===================================================================
--- gcc.dg/pr18241-2.c	(revision 112898)
+++ gcc.dg/pr18241-2.c	(working copy)
@@ -1,4 +1,6 @@
 /* { dg-do run } */
+/* memset doesn't take unsigned long */
+/* { dg-xfail-if "" { "m32c-*-*" } "*" "" } */
 /* { dg-options "-std=gnu99 -Wall -Wextra -O1" } */ 
 
 extern void *memset (void*, int, unsigned long);
Index: gcc.dg/pr19340.c
===================================================================
--- gcc.dg/pr19340.c	(revision 112898)
+++ gcc.dg/pr19340.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O1 -fschedule-insns2 -fsched2-use-traces" } */
-/* { dg-skip-if "No scheduling" { mmix-*-* cris-*-* m68k-*-* } { "*" } { "" } } */
+/* { dg-skip-if "No scheduling" { mmix-*-* cris-*-* m68k-*-* m32c-*-* } { "*" } { "" } } */
 
 extern double f (double x);
 
Index: gcc.dg/pr23049.c
===================================================================
--- gcc.dg/pr23049.c	(revision 112898)
+++ gcc.dg/pr23049.c	(working copy)
@@ -7,6 +7,7 @@
    the above expression.  */
 
 /* { dg-do compile } */
+/* { dg-require-effective-target int32plus } */
 /* { dg-options "-O3 -ftree-vectorize" } */
 
 static unsigned short int crc_table[256];
Index: gcc.dg/torture/pr26565.c
===================================================================
--- gcc.dg/torture/pr26565.c	(revision 112898)
+++ gcc.dg/torture/pr26565.c	(working copy)
@@ -1,4 +1,6 @@
 /* { dg-do run } */
+/* m32c is already packed.  */
+/* { dg-skip-if "" { "m32c-*-*" } { } { } } */
 
 void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n);
 
Index: gcc.dg/torture/pr26587.c
===================================================================
--- gcc.dg/torture/pr26587.c	(revision 112898)
+++ gcc.dg/torture/pr26587.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target int32plus } */
 
 extern void abort(void);
 typedef unsigned int BF_word;
Index: gcc.dg/torture/pr26630.c
===================================================================
--- gcc.dg/torture/pr26630.c	(revision 112898)
+++ gcc.dg/torture/pr26630.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target int32plus } */
 
 extern void abort(void);
 int main()
Index: gcc.dg/tree-ssa/loop-10.c
===================================================================
--- gcc.dg/tree-ssa/loop-10.c	(revision 112898)
+++ gcc.dg/tree-ssa/loop-10.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O1 -fdump-tree-optimized" } */
+/* { dg-require-effective-target int32plus } */
 
 int bar (void);
 
Index: gcc.dg/tree-ssa/loop-2.c
===================================================================
--- gcc.dg/tree-ssa/loop-2.c	(revision 112898)
+++ gcc.dg/tree-ssa/loop-2.c	(working copy)
@@ -2,6 +2,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O1 -fdump-tree-optimized" } */
+/* { dg-require-effective-target size32plus } */
 
 /* Size of this structure should be sufficiently weird so that no memory
    addressing mode applies.  */
Index: gcc.dg/tree-ssa/loop-4.c
===================================================================
--- gcc.dg/tree-ssa/loop-4.c	(revision 112898)
+++ gcc.dg/tree-ssa/loop-4.c	(working copy)
@@ -2,6 +2,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O1 -fdump-tree-optimized" } */
+/* { dg-require-effective-target size32plus } */
 
 /* Size of this structure should be sufficiently weird so that no memory
    addressing mode applies.  */
Index: gcc.dg/tree-ssa/ltrans-1.c
===================================================================
--- gcc.dg/tree-ssa/ltrans-1.c	(revision 112898)
+++ gcc.dg/tree-ssa/ltrans-1.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -ftree-loop-linear -fdump-tree-ltrans-all" } */
+/* { dg-require-effective-target size32plus } */
 
 double u[1782225];
 int foo(int N, int *res)
Index: gcc.dg/tree-ssa/ltrans-2.c
===================================================================
--- gcc.dg/tree-ssa/ltrans-2.c	(revision 112898)
+++ gcc.dg/tree-ssa/ltrans-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -ftree-loop-linear -fdump-tree-ltrans-all" } */
+/* { dg-require-effective-target size32plus } */
 
 double u[1782225];
 int foo(int N, int *res)
Index: gcc.dg/tree-ssa/ltrans-3.c
===================================================================
--- gcc.dg/tree-ssa/ltrans-3.c	(revision 112898)
+++ gcc.dg/tree-ssa/ltrans-3.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -ftree-loop-linear -fdump-tree-ltrans-all" } */
+/* { dg-require-effective-target size32plus } */
 
 double u[1782225];
 int foo(int N, int *res)
Index: gcc.dg/tree-ssa/ltrans-4.c
===================================================================
--- gcc.dg/tree-ssa/ltrans-4.c	(revision 112898)
+++ gcc.dg/tree-ssa/ltrans-4.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -ftree-loop-linear -fdump-tree-ltrans-all" } */
+/* { dg-require-effective-target size32plus } */
 
 double u[1782225];
 int foo(int N, int *res)
Index: gcc.dg/tree-ssa/pr14341.c
===================================================================
--- gcc.dg/tree-ssa/pr14341.c	(revision 112898)
+++ gcc.dg/tree-ssa/pr14341.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-require-effective-target int32plus } */
 
 void fn_call (int);
 int h(int, int);
Index: gcc.dg/tree-ssa/pr23382.c
===================================================================
--- gcc.dg/tree-ssa/pr23382.c	(revision 112898)
+++ gcc.dg/tree-ssa/pr23382.c	(working copy)
@@ -1,5 +1,7 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -fdump-tree-alias-vops" } */
+/* malloc doesn't take a long */
+/* { dg-xfail-if "" { "m32c-*-*" } { } { } } */
 struct a
 {
   int length;
Index: gcc.dg/tree-ssa/pr24627.c
===================================================================
--- gcc.dg/tree-ssa/pr24627.c	(revision 112898)
+++ gcc.dg/tree-ssa/pr24627.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O" } */
+/* { dg-require-effective-target int32plus } */
 
 extern void abort (void);
 typedef unsigned int u_int32;
Index: gcc.dg/tree-ssa/pr26180.c
===================================================================
--- gcc.dg/tree-ssa/pr26180.c	(revision 112898)
+++ gcc.dg/tree-ssa/pr26180.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target int32plus } */
 
 void abort(void);
 int bar(int x, int y)
Index: gcc.dg/tree-ssa/vrp14.c
===================================================================
--- gcc.dg/tree-ssa/vrp14.c	(revision 112898)
+++ gcc.dg/tree-ssa/vrp14.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target int32plus } */
 
 struct tree_decl
 {
Index: gcc.dg/tree-ssa/vrp21.c
===================================================================
--- gcc.dg/tree-ssa/vrp21.c	(revision 112898)
+++ gcc.dg/tree-ssa/vrp21.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O1 -ftree-vrp -fdump-tree-vrp1" } */
+/* { dg-require-effective-target int32plus } */
 
 extern void link_error ();
 
Index: gcc.dg/tree-ssa/vrp22.c
===================================================================
--- gcc.dg/tree-ssa/vrp22.c	(revision 112898)
+++ gcc.dg/tree-ssa/vrp22.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O1 -ftree-vrp -fdump-tree-vrp1" } */
+/* { dg-require-effective-target int32plus } */
 
 extern void link_error ();
 
Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp	(revision 112898)
+++ lib/target-supports.exp	(working copy)
@@ -300,6 +300,7 @@ proc check_profiling_available { test_wh
 	     || [istarget xscale*-*-elf]
 	     || [istarget cris-*-*]
 	     || [istarget h8300-*-*]
+	     || [istarget m32c-*-elf]
 	     || [istarget m68k-*-elf]
 	     || [istarget mips*-*-elf]
 	     || [istarget xtensa-*-elf]
@@ -926,6 +927,42 @@ proc check_effective_target_ilp32 { } {
     }]
 }
 
+# Return 1 if we're generating 32-bit or larger integers using default
+# options, 0 otherwise.
+
+proc check_effective_target_int32plus { } {
+    return [check_no_compiler_messages int32plus object {
+	int dummy[sizeof (int) >= 4 ? 1 : -1];
+    }]
+}
+
+# Return 1 if we're generating 32-bit or larger pointers using default
+# options, 0 otherwise.
+
+proc check_effective_target_ptr32plus { } {
+    return [check_no_compiler_messages ptr32plus object {
+	int dummy[sizeof (void *) >= 4 ? 1 : -1];
+    }]
+}
+
+# Return 1 if we support 32-bit or larger array and structure sizes
+# using default options, 0 otherwise.
+
+proc check_effective_target_size32plus { } {
+    return [check_no_compiler_messages size32plus object {
+	char dummy[65537];
+    }]
+}
+
+# Returns 1 if we're generating 16-bit or smaller integers with the
+# default options, 0 otherwise.
+
+proc check_effective_target_int16 { } {
+    return [check_no_compiler_messages int16 object {
+	int dummy[sizeof (int) < 4 ? 1 : -1];
+    }]
+}
+
 # Return 1 if we're generating 64-bit code using default options, 0
 # otherwise.
 



More information about the Gcc-patches mailing list