OSDN Git Service

PR target/40668
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / mayalias-3.c
1 typedef struct __attribute__((__may_alias__)) { short x; } test;
2
3 test *p;
4
5 int g(int *a)
6 {
7  p = (test*)a;
8 }
9
10 int f()
11 {
12   int a;
13   g(&a);
14   a = 10;
15   test s={1};
16   *p=s;
17   return a;
18 }
19
20 int main() {
21   if (f() == 10)
22     __builtin_abort();
23   return 0;
24 }
25
26