OSDN Git Service

2010-01-21 Martin Jambor <mjambor@suse.cz>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / Wstrict-aliasing-converted-assigned.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */
3
4
5 int foo()
6 {
7   int i;
8   *(long*)&i = 0;  /* { dg-warning "type-punn" } */
9   return i;
10 }
11
12 /* { dg-message "does break strict-aliasing" "" { target { *-*-* && lp64 } xfail *-*-* } 8 } */
13 /* { dg-message "initialized" "" { target { *-*-* && lp64 } xfail *-*-* } 8 } */