1 /* PR tree-optimization/89500 - ICE: tree check: expected integer_cst,
2 have ssa_name in get_len
4 { dg-options "-O2 -Wstringop-overflow -Wstringop-truncation" } */
9 char b
[16] = "abcdefg";
10 __builtin_strncpy (a
, b
, __builtin_strlen (b
)); /* { dg-warning "specified bound depends on the length of the source argument" } */
16 char b
[16] = "abcdefg";
17 __builtin_strncpy (a
, b
, __builtin_strnlen (b
, 8)); /* { dg-warning "specified bound depends on the length of the source argument" } */
23 char b
[16] = "abcdefg";
24 __builtin_strncpy (a
, b
, __builtin_strnlen (b
, 7)); /* { dg-warning "output truncated before terminating nul" } */
34 __builtin_memcpy (b
, "abcdefg", 7);
35 __builtin_strncpy (a
, b
, __builtin_strnlen (b
, 8)); /* { dg-bogus "specified bound depends on the length of the source argument" } */