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.
------------------------------------------------------------------------
===================================================================
@@ -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.
===================================================================
@@ -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);
===================================================================
@@ -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)
===================================================================
@@ -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, ...)
{
===================================================================
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target return_address } */
/* { dg-options "-finstrument-functions" } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } "*" "" } */
===================================================================
@@ -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));
===================================================================
@@ -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__));