nvptx cleanup
authorNathan Sidwell <nathan@acm.org>
Fri, 21 Aug 2015 13:13:42 +0000 (13:13 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Fri, 21 Aug 2015 13:13:42 +0000 (13:13 +0000)
nvptx cleanup
* lib/target-supports.exp (check_effective_target_freestanding): nvptx
is freestanding.
(check_effective_target_global_constructor): New.
* lib/gcc.exp (gcc_target_compile): Set SIGNAL_SUPPRESS if needed.
* gcc.dg/debug/debug.exp: Skip  for nvptx.
* gcc.dg/debug/dwarf2/dwarf2.exp: Likewise.

* gcc.c-torture/execute/981019-1.c: Ptx assembler bug.
* gcc.c-torture/compile/limits-externdecl.c: Likewise.
* gcc.c-torture/compile/pr33855.c: Likewise.
* gcc.c-torture/compile/920723-1.c: Likewise.
* gcc.c-torture/compile/pr35468.c: Ptx assembler objects to
writing a const.
* gcc.c-torture/compile/mangle-1.c: Ptx assembler objects to . in
label.
* gcc.c-torture/compile/callind.c: Ptx assembler objects to label
'call'.

* gcc.c-torture/execute/ieee/mul-subnormal-single-1.c: Make main
prototype normal.
* gcc.c-torture/execute/switch-1.c: Likewise.

* gcc.c-torture/execute/pr34456.c: Require not freestanding
* gcc.c-torture/execute/printf-1.c: Likewise.
* gcc.c-torture/execute/printf-chk-1.c: Likewise.
* gcc.c-torture/execute/fprintf-1.c: Likewise.
* gcc.c-torture/execute/fprintf-chk-1.c: Likewise.
* gcc.c-torture/execute/vprintf-1.c: Likewise.
* gcc.c-torture/execute/vprintf-chk-1.c: Likewise.
* gcc.c-torture/execute/vfprintf-1.c: Likewise.
* gcc.c-torture/execute/vfprintf-chk-1.c: Likewise.
* gcc.c-torture/execute/builtins/fputs.x: Likewise.
* gcc.c-torture/execute/gofast.c: Likewise.
* gcc.c-torture/execute/complex-6.c: Likewise.

* gcc.c-torture/execute/builtins/memcpy-chk.x: Require nonlocal goto.
* gcc.c-torture/execute/builtins/memmove-chk.x: Likewise.
* gcc.c-torture/execute/builtins/mempcpy-chk.x: Likewise.
* gcc.c-torture/execute/builtins/memset-chk.x: Likewise.
* gcc.c-torture/execute/builtins/snprintf-chk.x: Likewise.
* gcc.c-torture/execute/builtins/sprintf-chk.x: Likewise.
* gcc.c-torture/execute/builtins/stpcpy-chk.x: Likewise.
* gcc.c-torture/execute/builtins/stpncpy-chk.x: Likewise.
* gcc.c-torture/execute/builtins/strcat-chk.x: Likewise.
* gcc.c-torture/execute/builtins/strcpy-chk.x: Likewise.
* gcc.c-torture/execute/builtins/strncat-chk.x: Likewise.
* gcc.c-torture/execute/builtins/strncpy-chk.x: Likewise.
* gcc.c-torture/execute/builtins/vsnprintf-chk.x: Likewise.
* gcc.c-torture/execute/builtins/vsprintf-chk.x: Likewise.
* gcc.c-torture/execute/builtins/pr23484-chk.x: Likewise.
* gcc.dg/setjmp-1.c: Likewise.
* gcc.dg/cleanup-5.c: Likewise.
* gcc.dg/cleanup-12.c: Likewise.
* gcc.dg/cleanup-13.c: Likewise.

* gcc.dg/constructor-1.c: Require global ctor.

* gcc.dg/fork-instrumentation.c: Require profiling.
* gcc.dg/20030107-1.c: Likewise.
* gcc.dg/20030702-1.c: Likewise.

* gcc.dg/cpp/lexstrng.c: Avoid IO unless debugging.
* gcc.dg/cpp/paste2.c: Likewise.
* gcc.dg/cpp/strify3.c: Likewise.
* gcc.dg/cpp/strify4.c: Likewise.
* gcc.dg/cpp/lexnum.c: Likewise.
* gcc.dg/cpp/digraphs.c: Likewise.
* gcc.dg/cpp/macro1.c: Likewise.

From-SVN: r227059

56 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/920723-1.c
gcc/testsuite/gcc.c-torture/compile/callind.c
gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c
gcc/testsuite/gcc.c-torture/compile/mangle-1.c
gcc/testsuite/gcc.c-torture/compile/pr33855.c
gcc/testsuite/gcc.c-torture/compile/pr35468.c
gcc/testsuite/gcc.c-torture/execute/981019-1.c
gcc/testsuite/gcc.c-torture/execute/builtins/fputs.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/memmove-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/mempcpy-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/memset-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/pr23484-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/stpncpy-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/strcat-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/strncat-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.x
gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.x
gcc/testsuite/gcc.c-torture/execute/complex-6.c
gcc/testsuite/gcc.c-torture/execute/fprintf-1.c
gcc/testsuite/gcc.c-torture/execute/fprintf-chk-1.c
gcc/testsuite/gcc.c-torture/execute/gofast.c
gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.c
gcc/testsuite/gcc.c-torture/execute/pr34456.c
gcc/testsuite/gcc.c-torture/execute/printf-1.c
gcc/testsuite/gcc.c-torture/execute/printf-chk-1.c
gcc/testsuite/gcc.c-torture/execute/switch-1.c
gcc/testsuite/gcc.c-torture/execute/vfprintf-1.c
gcc/testsuite/gcc.c-torture/execute/vfprintf-chk-1.c
gcc/testsuite/gcc.c-torture/execute/vprintf-1.c
gcc/testsuite/gcc.c-torture/execute/vprintf-chk-1.c
gcc/testsuite/gcc.dg/20030107-1.c
gcc/testsuite/gcc.dg/20030702-1.c
gcc/testsuite/gcc.dg/cleanup-12.c
gcc/testsuite/gcc.dg/cleanup-13.c
gcc/testsuite/gcc.dg/cleanup-5.c
gcc/testsuite/gcc.dg/constructor-1.c
gcc/testsuite/gcc.dg/cpp/digraphs.c
gcc/testsuite/gcc.dg/cpp/lexnum.c
gcc/testsuite/gcc.dg/cpp/lexstrng.c
gcc/testsuite/gcc.dg/cpp/macro1.c
gcc/testsuite/gcc.dg/cpp/paste2.c
gcc/testsuite/gcc.dg/cpp/strify3.c
gcc/testsuite/gcc.dg/cpp/strify4.c
gcc/testsuite/gcc.dg/debug/debug.exp
gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
gcc/testsuite/gcc.dg/fork-instrumentation.c
gcc/testsuite/gcc.dg/setjmp-1.c
gcc/testsuite/lib/gcc.exp
gcc/testsuite/lib/target-supports.exp

index 171a92c286a0d8265d0640756b832d77512ee09e..95c82570ba59294a4413b93639377d5fb663bab5 100644 (file)
@@ -1,3 +1,74 @@
+2015-08-21  Nathan Sidwell  <nathan@acm.org>
+
+       * lib/target-supports.exp (check_effective_target_freestanding): nvptx
+       is freestanding.
+       (check_effective_target_global_constructor): New.
+       * lib/gcc.exp (gcc_target_compile): Set SIGNAL_SUPPRESS if needed.
+       * gcc.dg/debug/debug.exp: Skip  for nvptx.
+       * gcc.dg/debug/dwarf2/dwarf2.exp: Likewise.
+
+       * gcc.c-torture/execute/981019-1.c: Ptx assembler bug.
+       * gcc.c-torture/compile/limits-externdecl.c: Likewise.
+       * gcc.c-torture/compile/pr33855.c: Likewise.
+       * gcc.c-torture/compile/920723-1.c: Likewise.
+       * gcc.c-torture/compile/pr35468.c: Ptx assembler objects to
+       writing a const.
+       * gcc.c-torture/compile/mangle-1.c: Ptx assembler objects to . in
+       label.
+       * gcc.c-torture/compile/callind.c: Ptx assembler objects to label
+       'call'.
+
+       * gcc.c-torture/execute/ieee/mul-subnormal-single-1.c: Make main
+       prototype normal.
+       * gcc.c-torture/execute/switch-1.c: Likewise.
+
+       * gcc.c-torture/execute/pr34456.c: Require not freestanding
+       * gcc.c-torture/execute/printf-1.c: Likewise.
+       * gcc.c-torture/execute/printf-chk-1.c: Likewise.
+       * gcc.c-torture/execute/fprintf-1.c: Likewise.
+       * gcc.c-torture/execute/fprintf-chk-1.c: Likewise.
+       * gcc.c-torture/execute/vprintf-1.c: Likewise.
+       * gcc.c-torture/execute/vprintf-chk-1.c: Likewise.
+       * gcc.c-torture/execute/vfprintf-1.c: Likewise.
+       * gcc.c-torture/execute/vfprintf-chk-1.c: Likewise.
+       * gcc.c-torture/execute/builtins/fputs.x: Likewise.
+       * gcc.c-torture/execute/gofast.c: Likewise.
+       * gcc.c-torture/execute/complex-6.c: Likewise.
+
+       * gcc.c-torture/execute/builtins/memcpy-chk.x: Require nonlocal goto.
+       * gcc.c-torture/execute/builtins/memmove-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/mempcpy-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/memset-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/snprintf-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/sprintf-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/stpcpy-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/stpncpy-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/strcat-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/strcpy-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/strncat-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/strncpy-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/vsnprintf-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/vsprintf-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/pr23484-chk.x: Likewise.
+       * gcc.dg/setjmp-1.c: Likewise.
+       * gcc.dg/cleanup-5.c: Likewise.
+       * gcc.dg/cleanup-12.c: Likewise.
+       * gcc.dg/cleanup-13.c: Likewise.
+
+       * gcc.dg/constructor-1.c: Require global ctor.
+
+       * gcc.dg/fork-instrumentation.c: Require profiling.
+       * gcc.dg/20030107-1.c: Likewise.
+       * gcc.dg/20030702-1.c: Likewise.
+
+       * gcc.dg/cpp/lexstrng.c: Avoid IO unless debugging.
+       * gcc.dg/cpp/paste2.c: Likewise.
+       * gcc.dg/cpp/strify3.c: Likewise.
+       * gcc.dg/cpp/strify4.c: Likewise.
+       * gcc.dg/cpp/lexnum.c: Likewise.
+       * gcc.dg/cpp/digraphs.c: Likewise.
+       * gcc.dg/cpp/macro1.c: Likewise.
+
 2015-08-21  Dominik Vogt  <vogt@linux.vnet.ibm.com>
 
        * gcc.target/s390/zvector/vec-load_bndry-1.c: New test.
index d8734a6796e3951d30385985a8628ddfa152d450..26b83f6f8f7f830ed150e0ee5810708f92379920 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "ptxas seg faults" { nvptx-*-* } { "-O2" } { "" } } */
+
 #if defined(STACK_SIZE) && STACK_SIZE < 65536
 # define GITT_SIZE 75
 #endif
index 74c0f1f9cef94c4a277ec388729c57bd77ec5505..5938d1b88fcfa59fbe2bb1772434584e6d41bd7c 100644 (file)
@@ -1,8 +1,8 @@
-call (foo, a)
+bar (foo, a)
      int (**foo) ();
 {
 
-  (foo)[1] = call;
+  (foo)[1] = bar;
 
   foo[a] (1);
 }
index 17afe73088367f94762e1a824f1c0038da1763a9..f131eea3cf1bb230cfc668a40bad9852ce3824a0 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "ptxas runs out of memory" { nvptx-*-* } { "*" } { "" } } */
+
 /* { dg-require-effective-target int32plus } */
 /* Inspired by the test case for PR middle-end/52640.  */
 
index 7abc934e75c5ad457bcb8623162e274a2322fdec..6797bc2436f49c445e2eb805ef6b01dd568afc6b 100644 (file)
@@ -1,9 +1,17 @@
+
+#if __nvptx__
+/* Doesn't like . in labels.  */
+#define SEP "$"
+#else
+#define SEP "."
+#endif
+
 int foo(void)
 {
   static int x asm ("x") = 3;
   return x++;
 }
 
-int X2 asm ("x.0") = 4;
-int X3 asm ("_x.0") = 5;
+int X2 asm ("x" SEP "0") = 4;
+int X3 asm ("_x" SEP "0") = 5;
 
index e678cb34105abda8ff349c932d6ba083bdc5d40f..7e0d5ef0d735168a24fd38f5be8046240871e19d 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-skip-if "ptxas seg faults" { nvptx-*-* } { "-O1" } { "" } } */
 /* Testcase by Martin Michlmayr <tbm@cyrius.com> */
 /* Used to segfault due to cselim not marking the complex temp var
    as GIMPLE reg.  */
index 16d064b62228682e3621cd9644718ed195c871df..68f55654f6919a5cfc02906bb3182ade3793a7ee 100644 (file)
@@ -1,4 +1,5 @@
 /* PR tree-optimization/35468 */
+/* { dg-do compile } */
 
 void
 foo (void)
index 5d1f009009bfd16cce34ce076f23159ffe63933d..a093dff41b02f0d7cecc4233c5cb0e0af2987dad 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "ptxas seg faults" { nvptx-*-* } { "-O2" "-O3*" } { "" } } */
+
 extern int f2(void);
 extern int f3(void);
 extern void f1(void);
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/fputs.x b/gcc/testsuite/gcc.c-torture/execute/builtins/fputs.x
new file mode 100644 (file)
index 0000000..c8fdaf5
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_freestanding] } {
+        return 1; 
+}
+
+return 0;
index e976a755ba00d15628e8f2ef5914e03a628837b8..61ec1640a109878f005d84f00470e0fa22c3c3d0 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test4 struct A on epiphany would require
index acf2132367b13d757fb985bb4d59b9d68ee605e4..c34ebb1f78a3e524b54f792df6d7c78655736fb3 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test5 struct A on epiphany would require
index e976a755ba00d15628e8f2ef5914e03a628837b8..61ec1640a109878f005d84f00470e0fa22c3c3d0 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test4 struct A on epiphany would require
index 9b8363459c28762f82b5665ca030c09c280838df..3019199fefdbbdb9bac57fca97c68d3c8a471671 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test3 struct A on epiphany would require
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/pr23484-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/pr23484-chk.x
new file mode 100644 (file)
index 0000000..6f4746d
--- /dev/null
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
+return 0
index 9b8363459c28762f82b5665ca030c09c280838df..3019199fefdbbdb9bac57fca97c68d3c8a471671 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test3 struct A on epiphany would require
index 9b8363459c28762f82b5665ca030c09c280838df..3019199fefdbbdb9bac57fca97c68d3c8a471671 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test3 struct A on epiphany would require
index e976a755ba00d15628e8f2ef5914e03a628837b8..61ec1640a109878f005d84f00470e0fa22c3c3d0 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test4 struct A on epiphany would require
index e976a755ba00d15628e8f2ef5914e03a628837b8..61ec1640a109878f005d84f00470e0fa22c3c3d0 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test4 struct A on epiphany would require
index 9b8363459c28762f82b5665ca030c09c280838df..3019199fefdbbdb9bac57fca97c68d3c8a471671 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test3 struct A on epiphany would require
index e976a755ba00d15628e8f2ef5914e03a628837b8..61ec1640a109878f005d84f00470e0fa22c3c3d0 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test4 struct A on epiphany would require
index 9b8363459c28762f82b5665ca030c09c280838df..3019199fefdbbdb9bac57fca97c68d3c8a471671 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test3 struct A on epiphany would require
index e976a755ba00d15628e8f2ef5914e03a628837b8..61ec1640a109878f005d84f00470e0fa22c3c3d0 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test4 struct A on epiphany would require
index 0d6e85c971122b5ba1591a13259a5c10f2ee1e12..1decd1468e7623a0d67d3f96789693d8c6922f90 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test3_sub struct A on epiphany would require
index 0d6e85c971122b5ba1591a13259a5c10f2ee1e12..1decd1468e7623a0d67d3f96789693d8c6922f90 100644 (file)
@@ -1,3 +1,9 @@
+load_lib target-supports.exp
+
+if { ! [check_effective_target_nonlocal_goto] } {
+    return 1
+}
+
 if [istarget "epiphany-*-*"] {
     # This test assumes the absence of struct padding.
     # to make this true for test3_sub struct A on epiphany would require
index bbb8c8d40aa15cd36dee5f27b3420679c225c222..2e7a6cdd71be6e94b5bc58edf17463ccad91faa2 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } }  */
+
 /* This test tests complex conjugate and passing/returning of
    complex parameter.  */
 
index f16252b1e8e690c724f6217751017df4e61673ba..bd3069f5383423daef6afdf86184a671bef06624 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } }  */
+
 #include <stdio.h>
 #include <stdlib.h>
 
index 918ff8e5689a84e84ed63654c9a534a5acd9bff0..caad0a4bb3daad0788a8b920149b9d98e93074e1 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } }  */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
index f55ced22073b1f7000ab12c8d1c874a9b4e4a8da..a0b6e04465acb1dd4a6a0dd2b7aadbfec1b81d49 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } }  */
+
 /* Program to test gcc's usage of the gofast library.  */
 
 /* The main guiding themes are to make it trivial to add test cases over time
index d5f3fb45b6e44c72b98a054ca5cbcc2b574b7810..f4212146cd1fe06c2d0a78aae17ecf1b2b346dfa 100644 (file)
@@ -57,7 +57,7 @@ struct
   };
 
 int
-main (int argc, char *argv[], char *envp[])
+main ()
 {
   unsigned int i;
 
index 526c954e55ad88708b10b74a7628a8aa611a5f5c..53e46ed26a2cf887d6c2689137e8c91880fe5464 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "requires qsort" { freestanding } { "*" } { "" } }  */
+
 #include <stdlib.h>
 
 int __attribute__ ((noinline)) debug (void) { return 1; }
index 0ffcd5d443b662aeefe58c9ea99dfbb5ff10a770..13e331d3e576205765c6357a41dc7ede5a8acbb4 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } }  */
+
 #include <stdio.h>
 #include <stdlib.h>
 
index 8f9a79c5c578a0e78cc730411194c97889da4c77..fde85f9944274346dbaf478175ccb903af78291a 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } }  */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
index 30cffed7b857865e3fa23827aaac7915b461d37e..22565576413f8e56657b68b0f21b06cb47f6c5fe 100644 (file)
@@ -22,7 +22,7 @@ foo (int x)
 }
 
 int
-main (int argc)
+main ()
 {
   int i, r;
 
index c0038042542517cb458e6366b513402708c77970..c9ce492e8b985e9a580edaf797284fe902641eb0 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } }  */
+
 #ifndef test
 #include <stdio.h>
 #include <stdlib.h>
index f8f964c7e9af28828eca817159e666c1fae0fa22..a642209c19b917e38b1913b30c5eab80e3ee8380 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } }  */
+
 #ifndef test
 #include <stdio.h>
 #include <stdlib.h>
index 9f1b8bf67aa3535aaf5f542f980de9139fa0a369..8b7038fd7bf2fd02571aaf6d7425e61f6a9e506d 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } }  */
+
 #ifndef test
 #include <stdio.h>
 #include <stdlib.h>
index ca62f8b9fe24740f3a5028cf77ee59e345a0d226..f9bda6ed856f4ce08d15c7289fb07c80440bd3b3 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } }  */
+
 #ifndef test
 #include <stdio.h>
 #include <stdlib.h>
index 9264eba701efaa8dbc9b6e6da789e43af8e92cbe..91640807efda87f6b35a027594c68065c9177ba8 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fprofile-arcs" } */
+/* { dg-require-profiling "-fprofile-generate" } */
 
 extern void bar(void) __attribute__((noreturn));
 int foo (void) { bar(); }
index 1516a5a471d9e84f7588232df9cd1c77a7be6350..0bc1b1c88e1ad190e2575c840a0c1cec81e9db07 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do compile { target fpic } } */
 /* { dg-options "-O2 -fpic -fprofile-arcs" } */
 /* { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } */
+/* { dg-require-profiling "-fprofile-generate" } */
 
 int fork (void);
 
index 90de90ac8311ef265df72afc82fc0dac1c2f74fa..15c079f63fb30e4f28b1eb31207f423f8459eaf5 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -fexceptions" } */
 /* { dg-skip-if "" { "ia64-*-hpux11.*" }  { "*" } { "" } } */
+/* { dg-skip-if "" { ! nonlocal_goto } { "*" } { "" } } */
 /* Verify unwind info in presence of alloca.  */
 
 #include <unwind.h>
index 5a0d4c69f5a8f6a8f214ed990045a2cee414ffbe..0ab1ca27650204a72b22e9189ac0a70b35291bd1 100644 (file)
@@ -2,6 +2,7 @@
 /* { dg-do run } */
 /* { dg-options "-fexceptions" } */
 /* { dg-skip-if "" { "ia64-*-hpux11.*" }  { "*" } { "" } } */
+/* { dg-skip-if "" { ! nonlocal_goto } { "*" } { "" } } */
 /* Verify DW_OP_* handling in the unwinder.  */
 
 #include <unwind.h>
index c335c1e4492335cb95c459f77bc63c0e1b986f0e..816d4cef0c1588904e4afe8cdfa490778550875d 100644 (file)
@@ -2,6 +2,7 @@
 /* { dg-do run } */
 /* { dg-options "-fexceptions" } */
 /* { dg-skip-if "" { "ia64-*-hpux11.*" }  { "*" } { "" } } */
+/* { dg-skip-if "" { ! nonlocal_goto } { "*" } { "" } } */
 /* Verify that cleanups work with exception handling.  */
 
 #include <unwind.h>
index 1095a455cfa66786ae307382aea72605adf022c2..73e9fc320070692f035637bf0b452dff87c85e8a 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-skip-if "" { ! global_constructor } { "*" } { "" } } */
 
 /* The ipa-split pass pulls the body of the if(!x) block
    into a separate function to make foo a better inlining
index 49a1bcd860492b868e18fbb3f95cb9a3a847c00a..55bc46b061f57934a69d6fabfb21a6ec988010b3 100644 (file)
@@ -8,7 +8,11 @@
 
 extern int strcmp (const char *, const char *);
 extern void abort (void);
+#if DEBUG
 extern int puts (const char *);
+#else
+#define puts(X)
+#endif
 #define err(str) do { puts(str); abort(); } while (0)
 
 %:define glue(x, y) x %:%: y   /* #define glue(x, y) x ## y. */
index 7df15540833a7f69bf895139a14a4cd3d7c2d071..3d7a9a8ddf8787d3233ebe8de657dfb460936597 100644 (file)
@@ -5,7 +5,11 @@
 
 /* Test lexing of numbers.  */
 
+#if DEBUG
 extern int puts (const char *);
+#else
+#define puts(X)
+#endif
 extern void abort (void);
 #define err(str) do { puts(str); abort(); } while (0)
 
index b0353300395f3ae39b33924f3cdf2427bfad1d63..9e13cd5fa336327eb0ecce59fe4204bc4ccd72ec 100644 (file)
 typedef __WCHAR_TYPE__ wchar_t;
 
 extern int strcmp (const char *, const char *);
+#if DEBUG
 extern int puts (const char *);
+#else
+#define puts(X)
+#endif
 extern void abort (void);
 #define err(str) do { puts(str); abort(); } while (0)
 
index e7235f577c26a90c68d823a6ecd6e6fb19d142fe..a2b1a38e295ebe2e910c0cf6953cb2bbcd000522 100644 (file)
@@ -4,7 +4,11 @@
 
 /* Tests various macro abuse is correctly expanded.  */
 
+#if DEBUG
 extern int puts (const char *);
+#else
+#define puts(X)
+#endif
 extern void abort (void);
 extern int strcmp(const char *s1, const char *s2);
 
index 788e4eb51d33f8f278f7a1612f244a1568f4e3f9..b9bc7c2a8d0574b15c141bdd43ddd9442b9ef020 100644 (file)
 typedef __WCHAR_TYPE__ wchar_t;
 
 extern int strcmp (const char *, const char *);
+#if DEBUG
 extern int puts (const char *);
+#else
+#define puts(X)
+#endif
 extern void abort (void);
 #define err(str) do { puts(str); abort(); } while (0)
 
index 5d76b5e750fb1b0e01b82512368f4a56fd42052f..b2ee4ab5562786dc73ee3e98d2b19e0a91a4823f 100644 (file)
@@ -9,7 +9,11 @@
    Neil Booth, 24 Sep 2001.  */
 
 extern int strcmp (const char *, const char *);
+#if DEBUG
 extern int puts (const char *);
+#else
+#define puts(X)
+#endif
 extern void abort (void);
 #define err(str) do { puts(str); abort(); } while (0)
 
index b8b2f11e9d112546225c4d055ea45f0785356b59..9b4c0ddf4f1a790f235522144f9697f4baee4817 100644 (file)
@@ -4,7 +4,11 @@
    Andrew Pinski */
 
 extern int strcmp (const char *, const char *);
+#if DEBUG
 extern int puts (const char *);
+#else
+#define puts(X)
+#endif
 extern void abort (void);
 #define err(str) do { puts(str); abort(); } while (0)
 
index 908deb16a8d1071403effcf554cd735ee28ba04b..ac162ae64b48277654673ed99c971f6a845b43f9 100644 (file)
 # Load support procs.
 load_lib gcc-dg.exp
 
+# Disable on ptx
+if { [istarget nvptx-*-*] } {
+    return
+}
+
 # Initialize `dg'.
 dg-init
 
index d17bb5ee448a766ac054b102e9ae909073e4fcd1..9063eb1d3a5d5fb039552bade12d6e6a2d3c7686 100644 (file)
 # Load support procs.
 load_lib gcc-dg.exp
 
+# Disable on ptx
+if { [istarget nvptx-*-*] } {
+    return
+}
+
 # If a testcase doesn't have special options, use these.
 global DEFAULT_CFLAGS
 if ![info exists DEFAULT_CFLAGS] then {
index f875e18088283efba455bc09cea1480ab95c5809..aedb9ee797ec9093b28d44767204f1c8d8246637 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O0 -fprofile-generate" } */
+/* { dg-require-profiling "-fprofile-generate" } */
+
 int fork(void);
 int
 t()
index b5c84fc8792da3418bff517d5dc8aa7e112fc392..c5dcef24934e0ef959de2de8218d6206a2e22b12 100644 (file)
@@ -3,6 +3,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O -Wclobbered -Wextra -Wall" } */
+/* { dg-skip-if "" { ! nonlocal_goto } { "*" } { "" } } */
 
 #include <setjmp.h>
 
index 3ba8d3e5747c77f605381c14ba5ee94778b184f8..55e1c4fc22eaeaff20f40e4dccacecd07e7548b3 100644 (file)
@@ -150,6 +150,9 @@ proc gcc_target_compile { source dest type options } {
     if [target_info exists gcc,no_label_values] {
        lappend options "additional_flags=-DNO_LABEL_VALUES"
     }
+    if [target_info exists gcc,signal_suppress] {
+       lappend options "additional_flags=-DSIGNAL_SUPPRESS"
+    }
 
     # TEST_ALWAYS_FLAGS are flags that should be passed to every
     # compilation.  They are passed first to allow individual
index ef192111c435ccbae857457b42729a32e94a9f26..91fd35ba72271a4a3470e7c8e46fe724c8eb5510 100644 (file)
@@ -580,7 +580,10 @@ proc check_profiling_available { test_what } {
 # in Section 4 of C99 standard. Effectively, it is a target which supports no
 # extra headers or libraries other than what is considered essential.
 proc check_effective_target_freestanding { } {
-       return 0
+    if { [istarget nvptx-*-*] } {
+       return 1
+    }
+    return 0
 }
 
 # Return 1 if target has packed layout of structure members by
@@ -644,6 +647,15 @@ proc check_effective_target_nonlocal_goto {} {
     return 1
 }
 
+# Return 1 if global constructors are supported, 0 otherwise.
+
+proc check_effective_target_global_constructor {} {
+    if { [istarget nvptx-*-*] } {
+       return 0
+    }
+    return 1
+}
+
 # Return 1 if taking label values is supported, 0 otherwise.
 
 proc check_effective_target_label_values {} {