1 /* Check that the __builtin_strnlen returns 0 with with
2 non-constant 0 length. */
4 /* { dg-options "-O2" } */
6 extern int snprintf(char *, int, const char *, ...);
7 extern void abort (void);
14 const char* s
= "the string";
16 snprintf(buffer
, 4, "%s", s
);
18 for (i
= 1; i
< 4; i
++)
19 cmp
+= __builtin_strncmp(buffer
, s
, i
- 1);