145
|
1 /* PR middle-end/91599 - GCC does not say where warning is happening
|
|
2 { dg-do compile }
|
|
3 { dg-options "-O2 -Wall" } */
|
|
4
|
|
5 struct charseq {
|
|
6 unsigned char bytes[0]; // { dg-message "while referencing|object declared here" }
|
|
7 };
|
|
8
|
|
9 struct locale_ctype_t {
|
|
10 struct charseq *mboutdigits[10];
|
|
11 };
|
|
12
|
|
13 void ctype_finish (struct locale_ctype_t *ctype)
|
|
14 {
|
|
15 long unsigned int cnt;
|
|
16 for (cnt = 0; cnt < 20; ++cnt) {
|
|
17 static struct charseq replace[2];
|
|
18 replace[0].bytes[1] = '\0'; // { dg-warning "\\\[-Warray-bounds|-Wstringop-overflow" }
|
|
19 ctype->mboutdigits[cnt] = &replace[0];
|
|
20 }
|
|
21 }
|