1 /* { dg-do link } */ 2 /* { dg-options "-O2" } */ 3 4 struct X { double m; int x; }; 5 struct Y { int y; short d; }; 6 struct YY { int y; short d; char c; }; 7 8 extern void link_error (void); 9 foo(struct X * x,struct Y * y)10int foo(struct X *x, struct Y *y) 11 { 12 x->x = 0; 13 y->y = 1; 14 if (x->x != 0) 15 link_error (); 16 } 17 foo_no(struct X * x,struct YY * y)18int foo_no(struct X *x, struct YY *y) 19 { 20 x->x = 0; 21 y->y = 1; 22 if (x->x != 0) 23 link_error (); 24 } 25 main()26int main() {} 27