Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / strncpy-1.c
blob751eaeaf9fc3bcf09e49d786fc7ebdd341585a57
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-optimized" } */
4 void sink (void*);
6 void f (const char *s)
8 char a[256];
10 __builtin_memset (a, 0, sizeof a); // redundant memset
11 __builtin_strncpy (a, s, sizeof a);
13 sink (a);
16 /* { dg-final { scan-tree-dump-not "memset" "optimized" } } */