Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/20060412-1.c

raw
1 extern void abort (void);
2
3 struct S
4 {
5 long o;
6 };
7
8 struct T
9 {
10 long o;
11 struct S m[82];
12 };
13
14 struct T t;
15
16 int
17 main ()
18 {
19 struct S *p, *q;
20
21 p = (struct S *) &t;
22 p = &((struct T *) p)->m[0];
23 q = p + 82;
24 while (--q > p)
25 q->o = -1;
26 q->o = 0;
27
28 if (q > p)
29 abort ();
30 if (q - p > 0)
31 abort ();
32 return 0;
33 }