Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/Wstringop-overflow-3.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
rev | line source |
---|---|
131 | 1 /* PR tree-optimization/84238 */ |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-O2" } */ | |
4 /* { dg-require-effective-target alloca } */ | |
5 | |
6 char a[1]; | |
7 int b; | |
8 char *strncpy (char *, char *, __SIZE_TYPE__); | |
9 void | |
10 c () | |
11 { | |
12 char d[b]; | |
13 strncpy (a, &d[3], 3); /* { dg-warning "writing 3 bytes into a region of size 1" } */ | |
14 } |