This tweaks a few tests so that we don't have to skip them. This is mostly concerned with declaring main properly, or changing other declarations where the test does not seem to rely on the type mismatches.

I've also included one example of changing a function name to not be "call", ptxas seems to have a bug that makes it not allow this function name. If that doesn't seem too awful I'll have a few more tests to fix up in this way.

There'll be a 7th patch, not because I can't count, but because I didn't follow a consistent naming scheme for the patches.


Bernd

	* 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.
	* gcc.c-torture/compile/callind.c (bar): Renamed from call.

Index: gcc/testsuite/gcc.c-torture/compile/920625-2.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/920625-2.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/920625-2.c
@@ -100,4 +100,4 @@ copyQueryResult(Widget w, Boolean copy,
   freeReturnStruct();
 }
 
-freeReturnStruct(){}
+void freeReturnStruct(){}
Index: gcc/testsuite/gcc.c-torture/execute/20091229-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20091229-1.c.orig
+++ 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); }
Index: gcc/testsuite/gcc.c-torture/execute/20111208-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20111208-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20111208-1.c
@@ -1,7 +1,7 @@
 /* PR tree-optimization/51315 */
 /* Reported by Jurij Smakov <ju...@wooyd.org> */
 
-typedef unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
 
 extern void *memcpy (void *__restrict __dest,
        __const void *__restrict __src, size_t __n)
Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr61375.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr61375.c
@@ -19,7 +19,7 @@ uint128_central_bitsi_ior (unsigned __in
 }
 
 int
-main(int argc)
+main(int argc, char **argv)
 {
   __int128 in = 1;
 #ifdef __SIZEOF_INT128__
Index: gcc/testsuite/gcc.dg/pr30904.c
===================================================================
--- gcc/testsuite/gcc.dg/pr30904.c.orig
+++ 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)
 {
Index: gcc/testsuite/gcc.c-torture/compile/callind.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/callind.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/callind.c
@@ -1,8 +1,8 @@
-call (foo, a)
+bar (foo, a)
      int (**foo) ();
 {
 
-  (foo)[1] = call;
+  (foo)[1] = bar;
 
   foo[a] (1);
 }

Reply via email to