ptx testsuite fix for return addresses.

* 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
This commit is contained in:
Bernd Schmidt 2014-11-10 16:31:10 +00:00 committed by Bernd Schmidt
parent 5ea6b1bdc1
commit 02ff56e68a
9 changed files with 26 additions and 0 deletions

View 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.

View File

@ -1,4 +1,5 @@
/* PR tree-optimization/35468 */
/* { dg-require-effective-target no_const_addr_space } */
void
foo (void)

View 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);

View 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)

View 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, ...)
{

View File

@ -1,3 +1,4 @@
/* { dg-require-effective-target return_address } */
/* { dg-options "-finstrument-functions" } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } "*" "" } */

View 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));

View 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__));

View 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.