OSDN Git Service

2009-09-01 Diego Novillo <dnovillo@google.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / warn / Wstrict-aliasing-bogus-nested-arrays.C
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */
3
4 int foo () {
5   int buffer[10][10];
6   int* pi = &buffer[0][0];  /* { dg-bogus "same element type" } */
7   *pi = 10;
8   return buffer[0][0];
9 }