diff mbox

[7/7] nvptx testsuite patches: Return addresses

Message ID 54466DB9.8010102@codesourcery.com
State New
Headers show

Commit Message

Bernd Schmidt Oct. 21, 2014, 2:29 p.m. UTC
This tests for availability of return addresses in a number of tests.


Bernd

Comments

Jeff Law Oct. 21, 2014, 3:33 p.m. UTC | #1
On 10/21/14 14:29, Bernd Schmidt wrote:
> This tests for availability of return addresses in a number of tests.
>
>
> Bernd
>
>
> r422426.diff
>
>
> 	gcc/testsuite/
> 	* 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.
OK.
jeff
diff mbox

Patch

	gcc/testsuite/
	* 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.

------------------------------------------------------------------------
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp.orig
+++ gcc/testsuite/lib/target-supports.exp
@@ -604,7 +606,17 @@  proc add_options_for_tls { flags } {
     return 1
 }
 
+# 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.
 
Index: gcc/testsuite/gcc.c-torture/execute/20010122-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20010122-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20010122-1.c
@@ -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: gcc/testsuite/gcc.c-torture/execute/20030323-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20030323-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20030323-1.c
@@ -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: gcc/testsuite/gcc.c-torture/execute/20030811-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20030811-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20030811-1.c
@@ -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: gcc/testsuite/gcc.c-torture/execute/eeprof-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/eeprof-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/eeprof-1.c
@@ -1,3 +1,4 @@ 
+/* { dg-require-effective-target return_address } */
 /* { dg-options "-finstrument-functions" } */
 /* { dg-xfail-if "" { powerpc-ibm-aix* } "*" "" } */
 
Index: gcc/testsuite/gcc.c-torture/execute/frame-address.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/frame-address.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/frame-address.c
@@ -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: gcc/testsuite/gcc.c-torture/execute/pr17377.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr17377.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr17377.c
@@ -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__));