1 /* PR middle-end/54486 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wformat" } */
4 /* { dg-skip-if "no POSIX printf" { *-*-mingw* } } */
9 typedef __SIZE_TYPE__
size_t;
10 extern int printf (const char *, ...);
11 extern size_t strspn (const char *, const char *);
12 extern size_t strcspn (const char *, const char *);
13 extern size_t strlen (const char *);
21 printf ("%zu\n", strspn ("abc", "abcdefg"));
22 printf ("%zu\n", (size_t) strspn ("abc", "abcdefg"));
23 printf ("%zu\n", __builtin_strspn ("abc", "abcdefg"));
24 printf ("%zu\n", (size_t) __builtin_strspn ("abc", "abcdefg"));
25 printf ("%zu\n", strcspn ("abc", "abcdefg"));
26 printf ("%zu\n", (size_t) strcspn ("abc", "abcdefg"));
27 printf ("%zu\n", __builtin_strcspn ("abc", "abcdefg"));
28 printf ("%zu\n", (size_t) __builtin_strcspn ("abc", "abcdefg"));
29 printf ("%zu\n", strlen ("abc"));
30 printf ("%zu\n", (size_t) strlen ("abc"));
31 printf ("%zu\n", __builtin_strlen ("abc"));
32 printf ("%zu\n", (size_t) __builtin_strlen ("abc"));