1 /* PR target/60598 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4 /* { dg-additional-options "-fpic" { target fpic } } */
5 /* { dg-additional-options "-march=z196 -mtune=zEC12" { target s390*-*-* } } */
6 
7 struct S { unsigned a, b[32]; };
8 
9 void
foo(struct S * x,struct S * y)10 foo (struct S *x, struct S *y)
11 {
12   unsigned a = y->a, i;
13   if (x == y)
14     for (i = 0; i < a - 1 - i; i++)
15       {
16 	unsigned t = x->b[i];
17 	x->b[i] = x->b[a - 1 - i];
18 	x->b[a - 1 - i] = t;
19       }
20   else
21     {
22       x->a = a;
23       for (i = 0; i < a; i++)
24 	x->b[i] = y->b[a - 1 - i];
25     }
26 }
27