[PATCH] Fix partly PR45702

Richard Guenther rguenther@suse.de
Thu Sep 30 16:51:00 GMT 2010


By making the testcases link w/o -r -nostdlib.

Committed.

Richard.

2010-09-30  Richard Guenther  <rguenther@suse.de>

	PR testsuite/45702
	* gcc.dg/debug/pr41893-1.c: Adjust.
	* gcc.dg/pr30762-1.c: Likewise.
	* gcc.dg/pr31529-1.c: Likewise.
	* gcc.dg/pr34457-1.c: Likewise.
	* gcc.dg/pr34668-1.c: Likewise.
	* gcc.dg/pr43557-1.c: Likewise.

Index: gcc.dg/debug/pr41893-1.c
===================================================================
--- gcc.dg/debug/pr41893-1.c	(revision 164748)
+++ gcc.dg/debug/pr41893-1.c	(working copy)
@@ -1,7 +1,7 @@
 /* PR debug/41893 */
 /* { dg-do link } */
 /* { dg-require-effective-target lto } */
-/* { dg-options "-flto -fwhole-program -O -r -nostdlib" } */
+/* { dg-options "-flto -fwhole-program -O" } */
 /* { dg-additional-sources "pr41893-2.c" } */
 
 struct S { int v; };
@@ -12,3 +12,5 @@ func1 (void)
 {
   struct S *p = &s;
 }
+
+int main() { return 0; }
Index: gcc.dg/pr30762-1.c
===================================================================
--- gcc.dg/pr30762-1.c	(revision 164748)
+++ gcc.dg/pr30762-1.c	(working copy)
@@ -1,7 +1,7 @@
 /* PR c/30762 */
 /* { dg-do link } */
 /* { dg-require-effective-target lto } */
-/* { dg-options "-flto -r -nostdlib -O3" } */
+/* { dg-options "-flto -O3" } */
 /* { dg-additional-sources pr30762-2.c } */
 
 typedef struct { int i; } D;
@@ -14,3 +14,5 @@ bar (void)
   d.i = 1;
   foo (d);
 }
+
+int main() { return 0; }
Index: gcc.dg/pr31529-1.c
===================================================================
--- gcc.dg/pr31529-1.c	(revision 164748)
+++ gcc.dg/pr31529-1.c	(working copy)
@@ -1,8 +1,10 @@
 /* { dg-do link } */
 /* { dg-require-effective-target lto } */
-/* { dg-options "-flto -r -nostdlib" } */
+/* { dg-options "-flto" } */
 /* { dg-additional-sources "pr31529-2.c" } */
 
 getline ()
 {
 }
+
+int main() { return 0; }
Index: gcc.dg/pr34457-1.c
===================================================================
--- gcc.dg/pr34457-1.c	(revision 164748)
+++ gcc.dg/pr34457-1.c	(working copy)
@@ -2,7 +2,7 @@
 /* { dg-do link } */
 /* { dg-require-effective-target trampolines } */
 /* { dg-require-effective-target lto } */
-/* { dg-options "-flto -r -nostdlib -O2" } */
+/* { dg-options "-flto -O2" } */
 /* { dg-additional-sources "pr34457-2.c" } */
    
 
@@ -10,7 +10,7 @@ typedef __SIZE_TYPE__ size_t;
 extern int printf (const char *, ...);
 extern void *memset (void *, int, size_t);
 
-int bar (int (*)(), int, void *);
+int bar (int (*p)(), int q, void *r) {}
 
 int
 main(int argc, char **argv)
Index: gcc.dg/pr34668-1.c
===================================================================
--- gcc.dg/pr34668-1.c	(revision 164748)
+++ gcc.dg/pr34668-1.c	(working copy)
@@ -1,11 +1,11 @@
 /* PR c/34668 */
 /* { dg-do link } */
 /* { dg-require-effective-target lto } */
-/* { dg-options "-flto -r -nostdlib -O2" } */
+/* { dg-options "-flto -O2" } */
 /* { dg-additional-sources "pr34668-2.c" } */
 
 struct optab { unsigned code; };
-extern struct optab optab_table[1];
+struct optab optab_table[1];
 
 void
 init_optab (struct optab *op)
@@ -18,3 +18,5 @@ set_conv_libfunc (void)
 {
   init_optab (&optab_table[0]);
 }
+
+int main() { return 0; }
Index: gcc.dg/pr43557-1.c
===================================================================
--- gcc.dg/pr43557-1.c	(revision 164748)
+++ gcc.dg/pr43557-1.c	(working copy)
@@ -1,7 +1,7 @@
 /* PR debug/43557 */
 /* { dg-do link } */
 /* { dg-require-effective-target lto } */
-/* { dg-options "-flto -r -nostdlib -g -O2" } */
+/* { dg-options "-flto -g -O2" } */
 /* { dg-additional-sources "pr43557-2.c" } */
 
 struct S
@@ -15,3 +15,5 @@ f1 (void)
   struct S *s = &g;
   s->v = 0;
 }
+
+int main() { return 0; }



More information about the Gcc-patches mailing list