From 5ea6b1bdc19b9a326d95f8f2c0f85dbc4d81e62d Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Mon, 10 Nov 2014 16:31:00 +0000 Subject: [PATCH] Random testsuite tweaks for ptx. * gcc.c-torture/compile/920625-2.c: Add return type to freeReturnStruct. * gcc.c-torture/execute/20091229-1.c: Declare main properly. * gcc.c-torture/execute/pr61375.c: Likewise. * gcc.c-torture/execute/20111208-1.c: Use __SIZE_TYPE__ for size_t. * gcc.dg/pr30904.c: Remove extern from declaration of t. From-SVN: r217300 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.c-torture/compile/920625-2.c | 2 +- gcc/testsuite/gcc.c-torture/execute/20091229-1.c | 2 +- gcc/testsuite/gcc.c-torture/execute/20111208-1.c | 2 +- gcc/testsuite/gcc.c-torture/execute/pr61375.c | 2 +- gcc/testsuite/gcc.dg/pr30904.c | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 241034d6220..2da1b6f99e9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2014-11-10 Bernd Schmidt + * gcc.c-torture/compile/920625-2.c: Add return type to + freeReturnStruct. + * gcc.c-torture/execute/20091229-1.c: Declare main properly. + * gcc.c-torture/execute/pr61375.c: Likewise. + * gcc.c-torture/execute/20111208-1.c: Use __SIZE_TYPE__ for size_t. + * gcc.dg/pr30904.c: Remove extern from declaration of t. + * lib/target-supports.exp (check_effective_target_indirect_jumps): New function. (check_effective_target_nonlocal_goto): New function. diff --git a/gcc/testsuite/gcc.c-torture/compile/920625-2.c b/gcc/testsuite/gcc.c-torture/compile/920625-2.c index 291e80d0210..c0cb6db7d87 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920625-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/920625-2.c @@ -100,4 +100,4 @@ copyQueryResult(Widget w, Boolean copy, caddr_t call_data) freeReturnStruct(); } -freeReturnStruct(){} +void freeReturnStruct(){} diff --git a/gcc/testsuite/gcc.c-torture/execute/20091229-1.c b/gcc/testsuite/gcc.c-torture/execute/20091229-1.c index 08d952f1b3a..9b3a8c1498e 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20091229-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20091229-1.c @@ -1,2 +1,2 @@ long long foo(long long v) { return v / -0x080000000LL; } -void main() { if (foo(0x080000000LL) != -1) abort(); exit (0); } +int main(int argc, char **argv) { if (foo(0x080000000LL) != -1) abort(); exit (0); } diff --git a/gcc/testsuite/gcc.c-torture/execute/20111208-1.c b/gcc/testsuite/gcc.c-torture/execute/20111208-1.c index dc2b9ca8c86..470fca4fe90 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20111208-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20111208-1.c @@ -1,7 +1,7 @@ /* PR tree-optimization/51315 */ /* Reported by Jurij Smakov */ -typedef unsigned int size_t; +typedef __SIZE_TYPE__ size_t; extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) diff --git a/gcc/testsuite/gcc.c-torture/execute/pr61375.c b/gcc/testsuite/gcc.c-torture/execute/pr61375.c index 89302b2a1d6..325f340932f 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr61375.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr61375.c @@ -19,7 +19,7 @@ uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2) } int -main(int argc) +main(int argc, char **argv) { __int128 in = 1; #ifdef __SIZEOF_INT128__ diff --git a/gcc/testsuite/gcc.dg/pr30904.c b/gcc/testsuite/gcc.dg/pr30904.c index 31ca0497f91..244ee51f290 100644 --- a/gcc/testsuite/gcc.dg/pr30904.c +++ b/gcc/testsuite/gcc.dg/pr30904.c @@ -1,7 +1,7 @@ /* { dg-do link } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ -extern int t; +int t; extern void link_error(void); int main (void) { -- 2.30.2