Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / warn / Wstrict-aliasing-bogus-signed-unsigned.C
blob971e535590cf2df64c075350a4badb86d2ccb4af
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */
4 typedef int int32_t __attribute__((mode (__SI__)));
5 typedef unsigned uint32_t __attribute__((mode (__SI__)));
7 int32_t foo () {
8   int32_t i;
9   uint32_t* pu = reinterpret_cast<uint32_t*> (&i);  /* { dg-bogus "signed vs. unsigned" } */
10   *pu = 1000000;
11   return i;