libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / Wstringop-overflow-16.c
blob11fb05e730a799f58075e0031257df25ca994792
1 /* PR middle-end/91599 - GCC does not say where warning is happening
2 { dg-do compile }
3 { dg-options "-O2 -Wall" } */
5 struct charseq {
6 unsigned char bytes[0]; // { dg-message "while referencing|object declared here" }
7 };
9 struct locale_ctype_t {
10 struct charseq *mboutdigits[10];
13 void ctype_finish (struct locale_ctype_t *ctype)
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];