Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / c-c++-common / attr-may-alias-1.c
blob978b9a58faf9102af7d141f0b4c43156744ae07d
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wall" } */
4 typedef int T __attribute__((may_alias));
6 extern T *p;
7 extern int *p;
9 extern int *p2;
10 extern T *p2;
12 void fn1 (T);
13 void fn1 (int);
15 void fn2 (int);
16 void fn2 (T);
18 /* Ensure that the composite types have may_alias. */
19 void
20 f (long *i)
22 *i = *(__typeof (*p) *) &p;
23 asm ("" : : "r" (*p));
24 *i = *(__typeof (*p2) *) &p2;
25 asm ("" : : "r" (*p2));