Merged r158907 through r159238 into branch.
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wstrict-aliasing-bogus-signed-unsigned.C
blob5e71ebff805107fa06178eaa7966d3d077720ed2
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */
5 int foo () {
6   int i;
7   unsigned int* pu = reinterpret_cast<unsigned int*> (&i);  /* { dg-bogus "signed vs. unsigned" } */
8   *pu = 1000000;
9   return i;