PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20030828-2.c
blob0c3a195e626fa9693642c21cfa0d2bc40a731d77
1 struct rtx_def
3 int code;
4 };
6 main()
8 int tmp[2];
9 struct rtx_def *r, s;
10 int *p, *q;
12 /* The alias analyzer was creating the same memory tag for r, p and q
13 because 'struct rtx_def *' is type-compatible with 'int *'. However,
14 the alias set of 'int[2]' is not the same as 'int *', so variable
15 'tmp' was deemed not aliased with anything. */
16 r = &s;
17 r->code = 39;
19 /* If 'r' wasn't declared, then q and tmp would have had the same memory
20 tag. */
21 p = tmp;
22 q = p + 1;
23 *q = 0;
24 tmp[1] = 39;
25 if (*q != 39)
26 abort ();
27 exit (0);