comparison gcc/testsuite/gcc.dg/pr60598.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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
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 }