Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / Warray-bounds-70.c
blob087e255599c5f41b35eaa81f0e1d644d8eb7222e
1 /* PR middle-end/97556 - ICE on excessively large index into a multidimensional
2 array
3 { dg-do compile }
4 { dg-options "-O2 -Wall" } */
6 #define SIZE_MAX __SIZE_MAX__
8 typedef __SIZE_TYPE__ size_t;
10 char a[1][3];
12 void f (int c)
14 size_t i = c ? SIZE_MAX / 2 : SIZE_MAX;
15 a[i][0] = 0; // { dg-warning "\\\[-Warray-bounds" }
18 // { dg-prune-output "\\\[-Wstringop-overflow=" }