* gcc.c-torture/execute/20101011-1.c: Skip on SH.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20010118-1.c
blobee5197c9d9fc019414305a3ac02449632eadb17c
1 typedef struct {
2 int a, b, c, d, e, f;
3 } A;
5 void foo (A *v, int w, int x, int *y, int *z)
9 void
10 bar (A *v, int x, int y, int w, int h)
12 if (v->a != x || v->b != y) {
13 int oldw = w;
14 int oldh = h;
15 int e = v->e;
16 int f = v->f;
17 int dx, dy;
18 foo(v, 0, 0, &w, &h);
19 dx = (oldw - w) * (double) e/2.0;
20 dy = (oldh - h) * (double) f/2.0;
21 x += dx;
22 y += dy;
23 v->a = x;
24 v->b = y;
25 v->c = w;
26 v->d = h;
30 int main ()
32 A w = { 100, 110, 20, 30, -1, -1 };
33 bar (&w,400,420,50,70);
34 if (w.d != 70)
35 abort();
36 exit(0);