1 /* PR c/50584 - No warning for passing small array to C99 static array
2 declarator
3 { dg-do compile }
4 { dg-options "-Wall -Warray-parameter=1" } */
5
6 /* Also verify that -Warray-bounds doesn't trigger for ordinary array
7 parameters... */
8 #pragma GCC optimize ("2,no-tree-vectorize")
9
10 /* ...but does for static arrays. */
11 __attribute__ ((noipa)) void
12 gcas3 (char a[static 3])
13 {
14 a[0] = 0; a[1] = 1; a[2] = 2;
15 a[3] = 3; // { dg-warning "\\\[-Warray-bounds" }
16 }