PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr17252.c
blobbd1b6b99e982781721a6592beba0a231fe017cae
1 /* PR 17252. When a char * pointer P takes its own address, storing
2 into *P changes P itself. */
4 char *a;
6 main ()
8 /* Make 'a' point to itself. */
9 a = (char *)&a;
11 /* Change what 'a' is pointing to. */
12 a[0]++;
14 /* If a's memory tag does not contain 'a' in its alias set, we will
15 think that this predicate is superfluous and change it to
16 'if (1)'. */
17 if (a == (char *)&a)
18 abort ();
20 return 0;