OSDN Git Service

* lib/target-supports.exp (check_effective_target_int32plus): New.
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Apr 2006 23:14:25 +0000 (23:14 +0000)
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Apr 2006 23:14:25 +0000 (23:14 +0000)
(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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112934 138bc75d-0d04-0410-961f-82ee72b054a4

60 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20000804-1.c
gcc/testsuite/gcc.c-torture/compile/20001226-1.c
gcc/testsuite/gcc.c-torture/compile/20010327-1.c
gcc/testsuite/gcc.c-torture/compile/20020604-1.c
gcc/testsuite/gcc.c-torture/compile/20050303-1.c
gcc/testsuite/gcc.c-torture/compile/980506-1.c
gcc/testsuite/gcc.c-torture/execute/20020404-1.x
gcc/testsuite/gcc.c-torture/execute/20021024-1.x
gcc/testsuite/gcc.c-torture/execute/20040629-1.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/20040703-1.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/20040705-1.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/20040705-2.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/20040709-1.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/20040709-2.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/20040811-1.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/20050316-1.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/bitfld-4.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr19689.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr7284-1.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/shiftdi.x
gcc/testsuite/gcc.c-torture/execute/usmul.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/vrp-5.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/vrp-6.x [new file with mode: 0644]
gcc/testsuite/gcc.dg/20020312-2.c
gcc/testsuite/gcc.dg/20040622-2.c
gcc/testsuite/gcc.dg/20050321-1.c
gcc/testsuite/gcc.dg/20050321-2.c
gcc/testsuite/gcc.dg/asm-1.c
gcc/testsuite/gcc.dg/fold-mod-1.c
gcc/testsuite/gcc.dg/fold-overflow-1.c
gcc/testsuite/gcc.dg/format/bitfld-1.c
gcc/testsuite/gcc.dg/init-string-2.c
gcc/testsuite/gcc.dg/max-1.c
gcc/testsuite/gcc.dg/noncompile/920923-1.c
gcc/testsuite/gcc.dg/pch/struct-1.c
gcc/testsuite/gcc.dg/pr14796-2.c
gcc/testsuite/gcc.dg/pr17112-1.c
gcc/testsuite/gcc.dg/pr18241-1.c
gcc/testsuite/gcc.dg/pr18241-2.c
gcc/testsuite/gcc.dg/pr19340.c
gcc/testsuite/gcc.dg/pr23049.c
gcc/testsuite/gcc.dg/torture/pr26565.c
gcc/testsuite/gcc.dg/torture/pr26587.c
gcc/testsuite/gcc.dg/torture/pr26630.c
gcc/testsuite/gcc.dg/tree-ssa/loop-10.c
gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
gcc/testsuite/gcc.dg/tree-ssa/ltrans-1.c
gcc/testsuite/gcc.dg/tree-ssa/ltrans-2.c
gcc/testsuite/gcc.dg/tree-ssa/ltrans-3.c
gcc/testsuite/gcc.dg/tree-ssa/ltrans-4.c
gcc/testsuite/gcc.dg/tree-ssa/pr14341.c
gcc/testsuite/gcc.dg/tree-ssa/pr23382.c
gcc/testsuite/gcc.dg/tree-ssa/pr24627.c
gcc/testsuite/gcc.dg/tree-ssa/pr26180.c
gcc/testsuite/gcc.dg/tree-ssa/vrp14.c
gcc/testsuite/gcc.dg/tree-ssa/vrp21.c
gcc/testsuite/gcc.dg/tree-ssa/vrp22.c
gcc/testsuite/lib/target-supports.exp

index 185b366..6a5092d 100644 (file)
@@ -1,3 +1,83 @@
+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.
+
 2006-04-13  Roger Sayle  <roger@eyesopen.com>
 
        * gcc.target/i386/20050113-1.c: Tweak testcase to reflect that casts
index 1825cba..0decbc9 100644 (file)
@@ -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 0e71b14..9f1645a 100644 (file)
@@ -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 10f7e39..189990a 100644 (file)
@@ -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 ef24e1c..61632f7 100644 (file)
@@ -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 5993a45..22154b3 100644 (file)
@@ -1,3 +1,6 @@
+/* { dg-require-effective-target int32plus } */
+/* { dg-require-effective-target size32plus } */
+
 void crc()
 {
     int  toread;
index 9bc2d8a..6cccb1e 100644 (file)
@@ -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 25ed578..e4fd61a 100644 (file)
@@ -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 25ed578..121fcfe 100644 (file)
@@ -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;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040629-1.x b/gcc/testsuite/gcc.c-torture/execute/20040629-1.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040703-1.x b/gcc/testsuite/gcc.c-torture/execute/20040703-1.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040705-1.x b/gcc/testsuite/gcc.c-torture/execute/20040705-1.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040705-2.x b/gcc/testsuite/gcc.c-torture/execute/20040705-2.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040709-1.x b/gcc/testsuite/gcc.c-torture/execute/20040709-1.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040709-2.x b/gcc/testsuite/gcc.c-torture/execute/20040709-2.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040811-1.x b/gcc/testsuite/gcc.c-torture/execute/20040811-1.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050316-1.x b/gcc/testsuite/gcc.c-torture/execute/20050316-1.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/bitfld-4.x b/gcc/testsuite/gcc.c-torture/execute/bitfld-4.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr19689.x b/gcc/testsuite/gcc.c-torture/execute/pr19689.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr7284-1.x b/gcc/testsuite/gcc.c-torture/execute/pr7284-1.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
index 25ed578..121fcfe 100644 (file)
@@ -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;
diff --git a/gcc/testsuite/gcc.c-torture/execute/usmul.x b/gcc/testsuite/gcc.c-torture/execute/usmul.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/vrp-5.x b/gcc/testsuite/gcc.c-torture/execute/vrp-5.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/vrp-6.x b/gcc/testsuite/gcc.c-torture/execute/vrp-6.x
new file mode 100644 (file)
index 0000000..121fcfe
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+       return 1
+}
+
+return 0;
index 211fd75..6acc1e6 100644 (file)
@@ -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 3297401..0be320f 100644 (file)
@@ -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 01c68cd..5455db4 100644 (file)
@@ -3,6 +3,8 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O2 -fmodulo-sched" } */
+/* malloc doesn't take a long. */
+/* { dg-xfail-if "" { "m32c-*-*" } { "*" } { "" } } */
 extern void * malloc (long);
 
 struct s {
index 06d87cc..7f7e1c0 100644 (file)
@@ -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 3bf5c29..fecac78 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target int32plus } */
 
 struct x {
   int selector;
index 4a26d0f..3f7696f 100644 (file)
@@ -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 5e410b9..bed8aac 100644 (file)
@@ -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 2cea5d2..e828ad9 100644 (file)
@@ -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 828897b..9efd44b 100644 (file)
@@ -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 7f03edc..02aaa46 100644 (file)
@@ -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 4ff0084..8011f28 100644 (file)
@@ -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 d6c03e7..698e88b 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
 #include "struct-1.h"
 
 struct ChainSearchRecord {
index 195530b..2de5411 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target int32plus } */
 /* { dg-options "-fdump-tree-gimple" } */
 
 int f (int a) {
index 09c3758..04d3a2e 100644 (file)
@@ -1,5 +1,6 @@
 /* PR middle-end/17112 */
 /* { dg-do run } */
+/* { dg-require-effective-target int32plus } */
 /* { dg-options "-O2" } */
 
 extern void abort(void);
index 99c9e38..f5134d3 100644 (file)
@@ -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 502dc55..8922124 100644 (file)
@@ -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 89c82f6..27cd8c8 100644 (file)
@@ -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 0a71cec..e58cef8 100644 (file)
@@ -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 9b43140..d762032 100644 (file)
@@ -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 fd3c690..ad5d60f 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target int32plus } */
 
 extern void abort(void);
 typedef unsigned int BF_word;
index 08cf5f6..96bab36 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target int32plus } */
 
 extern void abort(void);
 int main()
index 4b67c82..03c2ddd 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O1 -fdump-tree-optimized" } */
+/* { dg-require-effective-target int32plus } */
 
 int bar (void);
 
index afb0d16..8f31959 100644 (file)
@@ -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 89d9561..a6c8c8f 100644 (file)
@@ -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 33b82cb..a3a9975 100644 (file)
@@ -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 9cfa60d..9548bf2 100644 (file)
@@ -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 0cb266f..86424ab 100644 (file)
@@ -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 4e60eae..e2d6abc 100644 (file)
@@ -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 ee661a0..0287a25 100644 (file)
@@ -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 b1dd6d5..e515417 100644 (file)
@@ -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 011410c..c065eef 100644 (file)
@@ -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 730115b..13c302d 100644 (file)
@@ -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 833a73d..a65d8a1 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target int32plus } */
 
 struct tree_decl
 {
index 0e675d9..9a4e4e7 100644 (file)
@@ -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 6120d07..cbd4dc5 100644 (file)
@@ -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 40f0698..abe4fb9 100644 (file)
@@ -300,6 +300,7 @@ proc check_profiling_available { test_what } {
             || [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.