* gcc.dg/predict-12.c: New testcase.
[official-gcc.git] / gcc / testsuite / gcc.dg / strncpy-fix-1.c
blobb8bc916e00896f74e544c1bb5ad0f046b9993cf5
1 /* Test that use of strncpy does not result in a "value computed is
2 not used" warning. */
3 /* { dg-do compile } */
4 /* { dg-options "-O2 -Wall" } */
6 #include <string.h>
7 void
8 f (char *s)
10 strncpy (s, "::", 2);