* 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
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.
/* PR tree-optimization/35468 */
+/* { dg-require-effective-target no_const_addr_space } */
void
foo (void)
/* { dg-skip-if "requires frame pointers" { *-*-* } "-fomit-frame-pointer" "" } */
+/* { dg-require-effective-target return_address } */
extern void exit (int);
extern void abort (void);
/* 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)
/* Origin: PR target/11535 from H. J. Lu <hjl@lucon.org> */
+/* { dg-require-effective-target return_address } */
void vararg (int i, ...)
{
+/* { dg-require-effective-target return_address } */
/* { dg-options "-finstrument-functions" } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } "*" "" } */
+/* { 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));
/* 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__));
}]
}
+# 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.