ptx testsuite fix for return addresses.
authorBernd Schmidt <bernds@codesourcery.com>
Mon, 10 Nov 2014 16:31:10 +0000 (16:31 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Mon, 10 Nov 2014 16:31:10 +0000 (16:31 +0000)
* lib/target-supports.exp (check_effective_target_return_address):
New function.
* gcc.c-torture/execute/20010122-1.c: Require return_address.
* gcc.c-torture/execute/20030323-1.c: Likewise.
* gcc.c-torture/execute/20030811-1.c: Likewise.
* gcc.c-torture/execute/eeprof-1.c: Likewise.
* gcc.c-torture/execute/frame-address.c: Likewise.
* gcc.c-torture/execute/pr17377.c: Likewise.

From-SVN: r217301

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr35468.c
gcc/testsuite/gcc.c-torture/execute/20010122-1.c
gcc/testsuite/gcc.c-torture/execute/20030323-1.c
gcc/testsuite/gcc.c-torture/execute/20030811-1.c
gcc/testsuite/gcc.c-torture/execute/eeprof-1.c
gcc/testsuite/gcc.c-torture/execute/frame-address.c
gcc/testsuite/gcc.c-torture/execute/pr17377.c
gcc/testsuite/lib/target-supports.exp

index 2da1b6f99e9a325ec22abccee2be540baab8e47a..3af1a43c8f2e1211854c41c3f54300f307689048 100644 (file)
@@ -1,5 +1,14 @@
 2014-11-10  Bernd Schmidt  <bernds@codesourcery.com>
 
+       * lib/target-supports.exp (check_effective_target_return_address):
+       New function.
+       * gcc.c-torture/execute/20010122-1.c: Require return_address.
+       * gcc.c-torture/execute/20030323-1.c: Likewise.
+       * gcc.c-torture/execute/20030811-1.c: Likewise.
+       * gcc.c-torture/execute/eeprof-1.c: Likewise.
+       * gcc.c-torture/execute/frame-address.c: Likewise.
+       * gcc.c-torture/execute/pr17377.c: Likewise.
+
        * gcc.c-torture/compile/920625-2.c: Add return type to
        freeReturnStruct.
        * gcc.c-torture/execute/20091229-1.c: Declare main properly.
index 16d064b62228682e3621cd9644718ed195c871df..0fa017fc73832957b3a7da2bf307add92d1e5567 100644 (file)
@@ -1,4 +1,5 @@
 /* PR tree-optimization/35468 */
+/* { dg-require-effective-target no_const_addr_space } */
 
 void
 foo (void)
index 14269fa7f0e556c8b4cab51f19a500e8dff1c435..528cef7139d76371559461f43279748b4e46f859 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-skip-if "requires frame pointers" { *-*-* } "-fomit-frame-pointer" "" } */
+/* { dg-require-effective-target return_address } */
 
 extern void exit (int);
 extern void abort (void);
index 35e2bd18112f168cbd8e88d3551fecc80e3ac984..bace9a2772296d28ddf6fc51c8aed857b0879ac2 100644 (file)
@@ -1,4 +1,5 @@
 /* PR opt/10116 */
+/* { dg-require-effective-target return_address } */
 /* Removed tablejump while label still in use; this is really a link test.  */
 
 void *NSReturnAddress(int offset)
index 2ac59c03af270a0ee7f28108915e2c8c8db14b2f..29cfa1591e04cb9d21b5d797b71f43873a3e53d7 100644 (file)
@@ -1,4 +1,5 @@
 /* Origin: PR target/11535 from H. J. Lu <hjl@lucon.org> */
+/* { dg-require-effective-target return_address } */
 
 void vararg (int i, ...)
 {
index 96dab9a33e139799cbf0ebc8bbe4034f89868310..c2a9ff65f18c94f6fe99c103f3a303ca4467a5ee 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target return_address } */
 /* { dg-options "-finstrument-functions" } */
 /* { dg-xfail-if "" { powerpc-ibm-aix* } "*" "" } */
 
index 109c2b229c82076252c6e938646f849bcd0f92ea..e453f88435966ae1e10728131484bc142ed2d90b 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target return_address } */
 int check_fa_work (const char *, const char *) __attribute__((noinline));
 int check_fa_mid (const char *) __attribute__((noinline));
 int check_fa (char *) __attribute__((noinline));
index 87d23c5cc1b020497a9f889a91a4b8ae57b57d2c..11094d1bea5b3d1da1864ae3c2a8dd5fbd55e861 100644 (file)
@@ -1,6 +1,7 @@
 /* PR target/17377
    Bug in code emitted by "return" pattern on CRIS: missing pop of
    forced return address on stack.  */
+/* { dg-require-effective-target return_address } */
 int calls = 0;
 
 void *f (int) __attribute__ ((__noinline__));
index 123f074040d6ff1437832d92bf87f41c8cd8b08e..a31d050b4360c1bb0ba8684a2223c2d98cad8c20 100644 (file)
@@ -632,6 +632,16 @@ proc check_effective_target_label_values {} {
     }]
 }
 
+# Return 1 if builtin_return_address and builtin_frame_address are
+# supported, 0 otherwise.
+
+proc check_effective_target_return_address {} {
+    if { [istarget nvptx-*-*] } {
+       return 0
+    }
+    return 1
+}
+
 # Return 1 if the assembler does not verify function types against
 # calls, 0 otherwise.  Such verification will typically show up problems
 # with K&R C function declarations.