* gcc.c-torture/execute/20101011-1.c: Skip on SH.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20060929-1.c
blob76c447fd5b3c43ef04cee696903a9f693834fecd
1 /* PR c/29154 */
3 extern void abort (void);
5 void
6 foo (int **p, int *q)
8 *(*p++)++ = *q++;
11 void
12 bar (int **p, int *q)
14 **p = *q++;
15 *(*p++)++;
18 void
19 baz (int **p, int *q)
21 **p = *q++;
22 (*p++)++;
25 int
26 main (void)
28 int i = 42, j = 0;
29 int *p = &i;
30 foo (&p, &j);
31 if (p - 1 != &i || j != 0 || i != 0)
32 abort ();
33 i = 43;
34 p = &i;
35 bar (&p, &j);
36 if (p - 1 != &i || j != 0 || i != 0)
37 abort ();
38 i = 44;
39 p = &i;
40 baz (&p, &j);
41 if (p - 1 != &i || j != 0 || i != 0)
42 abort ();
43 return 0;