1 /* PR tree-optimization/84468 - bogus -Wstringop-truncation despite
2 assignment after conditional strncpy
4 { dg-options "-O2 -Wstringop-truncation -g" } */
6 extern char* strncpy (char*, const char*, __SIZE_TYPE__
);
17 strncpy (a
, s
, sizeof a
); /* { dg-bogus "\\\[-Wstringop-truncation]" } */
35 strncpy (a
, s
, sizeof a
); /* { dg-bogus "\\\[-Wstringop-truncation]" } */
57 strncpy (a
, s
, sizeof a
); /* { dg-bogus "\\\[-Wstringop-truncation]" } */
84 strncpy (a
, s
, sizeof a
); /* { dg-bogus "\\\[-Wstringop-truncation]" } */
100 void f4_warn (char *s
)
114 strncpy (a
, s
, sizeof a
); /* { dg-warning "\\\[-Wstringop-truncation]" } */