[PATCH] Fix PR45702
Richard Guenther
rguenther@suse.de
Thu Nov 4 11:13:00 GMT 2010
This moves the problematic testcases to the LTO testsuite where we
have more knobs.
Tested on x86_64-unknown-linux-gnu, committed.
Richard.
2010-11-04 Richard Guenther <rguenther@suse.de>
PR testsuite/45702
* gcc.dg/pr34989-1.c: Move ...
* gcc.dg/lto/pr34989-1_0.c: ... here.
* gcc.dg/pr34989-2.c: Move ...
* gcc.dg/lto/pr34989-1_1.c: ... here.
* gcc.dg/pr27898.c: Move ...
* gcc.dg/lto/pr27898_0.c: ... here and ...
* gcc.dg/lto/pr27898_1.c: ... split.
* gcc.dg/pr28712.c: Move ...
* gcc.dg/lto/pr28712_0.c: ... here and ...
* gcc.dg/lto/pr28712_1.c: ... split ...
* gcc.dg/lto/pr28712_2.c: ... twice.
* gcc.dg/pr28706.c: Move ...
* gcc.dg/lto/pr28706_0.c: ... here and ...
* gcc.dg/lto/pr28706_1.c: ... split.
Index: gcc/testsuite/gcc.dg/pr34989-1.c
===================================================================
*** gcc/testsuite/gcc.dg/pr34989-1.c (revision 166302)
--- gcc/testsuite/gcc.dg/pr34989-1.c (working copy)
***************
*** 1,11 ****
- /* { dg-do link } */
- /* { dg-require-effective-target lto } */
- /* { dg-options "-flto -r -nostdlib -O2" } */
- /* { dg-additional-sources "pr34989-2.c" } */
-
- extern struct globals *const ptr_to_globals;
- struct globals { };
- int syslogd_main(int argc, char **argv)
- {
- (*(struct globals**)&ptr_to_globals) = 0;
- }
--- 0 ----
Index: gcc/testsuite/gcc.dg/pr34989-2.c
===================================================================
*** gcc/testsuite/gcc.dg/pr34989-2.c (revision 166302)
--- gcc/testsuite/gcc.dg/pr34989-2.c (working copy)
***************
*** 1,3 ****
- /* { dg-do compile } */
-
- extern struct globals *const ptr_to_globals;
--- 0 ----
Index: gcc/testsuite/gcc.dg/pr27898.c
===================================================================
*** gcc/testsuite/gcc.dg/pr27898.c (revision 166302)
--- gcc/testsuite/gcc.dg/pr27898.c (working copy)
***************
*** 1,9 ****
- /* PR c/27898 */
- /* { dg-do link } */
- /* { dg-require-effective-target lto } */
- /* { dg-options "-flto -r -nostdlib" } */
- /* { dg-additional-sources "pr27898.c" } */
-
- union u { struct { int i; }; };
-
- extern int foo (union u *);
--- 0 ----
Index: gcc/testsuite/gcc.dg/lto/pr28712_2.c
===================================================================
*** gcc/testsuite/gcc.dg/lto/pr28712_2.c (revision 0)
--- gcc/testsuite/gcc.dg/lto/pr28712_2.c (revision 0)
***************
*** 0 ****
--- 1,13 ----
+ /* PR c/28712 */
+
+ struct A;
+
+ extern struct A *a;
+
+ struct A { } __attribute__((packed));
+
+ struct B __attribute__((aligned (sizeof (int))));
+
+ extern struct B *b;
+
+ struct B { int i; } __attribute__((packed));
Index: gcc/testsuite/gcc.dg/lto/pr28706_1.c
===================================================================
*** gcc/testsuite/gcc.dg/lto/pr28706_1.c (revision 0)
--- gcc/testsuite/gcc.dg/lto/pr28706_1.c (revision 0)
***************
*** 0 ****
--- 1,9 ----
+ /* PR c/28706 */
+
+ struct A
+ {
+ int i;
+ } __attribute__((aligned (sizeof (long int))));
+
+ extern void foo (struct A *);
+ extern void foo (struct A *);
Index: gcc/testsuite/gcc.dg/lto/pr34989-1_0.c
===================================================================
*** gcc/testsuite/gcc.dg/lto/pr34989-1_0.c (revision 166302)
--- gcc/testsuite/gcc.dg/lto/pr34989-1_0.c (working copy)
***************
*** 1,7 ****
! /* { dg-do link } */
! /* { dg-require-effective-target lto } */
! /* { dg-options "-flto -r -nostdlib -O2" } */
! /* { dg-additional-sources "pr34989-2.c" } */
extern struct globals *const ptr_to_globals;
struct globals { };
--- 1,4 ----
! /* { dg-lto-do link } */
extern struct globals *const ptr_to_globals;
struct globals { };
*************** int syslogd_main(int argc, char **argv)
*** 9,11 ****
--- 6,10 ----
{
(*(struct globals**)&ptr_to_globals) = 0;
}
+
+ int main() { return 0; }
Index: gcc/testsuite/gcc.dg/lto/pr34989-1_1.c
===================================================================
*** gcc/testsuite/gcc.dg/lto/pr34989-1_1.c (revision 166302)
--- gcc/testsuite/gcc.dg/lto/pr34989-1_1.c (working copy)
***************
*** 1,3 ****
! /* { dg-do compile } */
!
! extern struct globals *const ptr_to_globals;
--- 1 ----
! struct globals *const ptr_to_globals;
Index: gcc/testsuite/gcc.dg/lto/pr27898_0.c
===================================================================
*** gcc/testsuite/gcc.dg/lto/pr27898_0.c (revision 166302)
--- gcc/testsuite/gcc.dg/lto/pr27898_0.c (working copy)
***************
*** 1,9 ****
/* PR c/27898 */
! /* { dg-do link } */
! /* { dg-require-effective-target lto } */
! /* { dg-options "-flto -r -nostdlib" } */
! /* { dg-additional-sources "pr27898.c" } */
union u { struct { int i; }; };
extern int foo (union u *);
--- 1,8 ----
/* PR c/27898 */
! /* { dg-lto-do link } */
union u { struct { int i; }; };
extern int foo (union u *);
+
+ int main() { return 0; }
Index: gcc/testsuite/gcc.dg/lto/pr28712_0.c
===================================================================
*** gcc/testsuite/gcc.dg/lto/pr28712_0.c (revision 166302)
--- gcc/testsuite/gcc.dg/lto/pr28712_0.c (working copy)
***************
*** 1,8 ****
/* PR c/28712 */
! /* { dg-do link } */
! /* { dg-require-effective-target lto } */
! /* { dg-options "-flto -r -nostdlib" } */
! /* { dg-additional-sources "pr28712.c pr28712.c" } */
struct A;
--- 1,5 ----
/* PR c/28712 */
! /* { dg-lto-do link } */
struct A;
*************** struct B __attribute__((aligned (sizeof
*** 15,17 ****
--- 12,16 ----
extern struct B *b;
struct B { int i; } __attribute__((packed));
+
+ int main() { return 0; }
Index: gcc/testsuite/gcc.dg/lto/pr27898_1.c
===================================================================
*** gcc/testsuite/gcc.dg/lto/pr27898_1.c (revision 0)
--- gcc/testsuite/gcc.dg/lto/pr27898_1.c (revision 0)
***************
*** 0 ****
--- 1,3 ----
+ union u { struct { int i; }; };
+
+ extern int foo (union u *);
Index: gcc/testsuite/gcc.dg/lto/pr28712_1.c
===================================================================
*** gcc/testsuite/gcc.dg/lto/pr28712_1.c (revision 0)
--- gcc/testsuite/gcc.dg/lto/pr28712_1.c (revision 0)
***************
*** 0 ****
--- 1,12 ----
+ /* PR c/28712 */
+ struct A;
+
+ extern struct A *a;
+
+ struct A { } __attribute__((packed));
+
+ struct B __attribute__((aligned (sizeof (int))));
+
+ extern struct B *b;
+
+ struct B { int i; } __attribute__((packed));
Index: gcc/testsuite/gcc.dg/lto/pr28706_0.c
===================================================================
*** gcc/testsuite/gcc.dg/lto/pr28706_0.c (revision 166302)
--- gcc/testsuite/gcc.dg/lto/pr28706_0.c (working copy)
***************
*** 1,8 ****
/* PR c/28706 */
! /* { dg-do link } */
! /* { dg-require-effective-target lto } */
! /* { dg-options "-flto -r -nostdlib" } */
! /* { dg-additional-sources "pr28706.c" } */
struct A
{
--- 1,5 ----
/* PR c/28706 */
! /* { dg-lto-do link } */
struct A
{
*************** struct A
*** 11,13 ****
--- 8,12 ----
extern void foo (struct A *);
extern void foo (struct A *);
+
+ int main() { return 0; }
Index: gcc/testsuite/gcc.dg/pr28712.c
===================================================================
*** gcc/testsuite/gcc.dg/pr28712.c (revision 166302)
--- gcc/testsuite/gcc.dg/pr28712.c (working copy)
***************
*** 1,17 ****
- /* PR c/28712 */
- /* { dg-do link } */
- /* { dg-require-effective-target lto } */
- /* { dg-options "-flto -r -nostdlib" } */
- /* { dg-additional-sources "pr28712.c pr28712.c" } */
-
- struct A;
-
- extern struct A *a;
-
- struct A { } __attribute__((packed));
-
- struct B __attribute__((aligned (sizeof (int))));
-
- extern struct B *b;
-
- struct B { int i; } __attribute__((packed));
--- 0 ----
Index: gcc/testsuite/gcc.dg/pr28706.c
===================================================================
*** gcc/testsuite/gcc.dg/pr28706.c (revision 166302)
--- gcc/testsuite/gcc.dg/pr28706.c (working copy)
***************
*** 1,13 ****
- /* PR c/28706 */
- /* { dg-do link } */
- /* { dg-require-effective-target lto } */
- /* { dg-options "-flto -r -nostdlib" } */
- /* { dg-additional-sources "pr28706.c" } */
-
- struct A
- {
- int i;
- } __attribute__((aligned (sizeof (long int))));
-
- extern void foo (struct A *);
- extern void foo (struct A *);
--- 0 ----
More information about the Gcc-patches
mailing list