PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / mayalias-1.c
blobba461cae1969fd63e7d0d43c6083a69f9dcb2470
1 /* Tests that the may_alias attribute works as expected.
2 Author: Osku Salerma <osku@iki.fi> Apr 2002. */
4 extern void abort(void);
5 extern void exit(int);
7 typedef short __attribute__((__may_alias__)) short_a;
9 int
10 main (void)
12 int a = 0x12345678;
13 short_a *b = (short_a*) &a;
15 b[1] = 0;
17 if (a == 0x12345678)
18 abort();
20 exit(0);