1 /* PR middle-end/89957 - ICE calling strnlen with an int128_t bound
3 PR middle-end/89911 - ICE on a call with no arguments to strnlen
4 declared with no prototype
6 { dg-options "-O2 -fpermissive -Wall" } */
8 typedef __SIZE_TYPE__
size_t;
10 extern size_t strnlen ();
14 return strnlen (); /* { dg-warning "too few arguments to built-in function 'strnlen'" } */
17 size_t f1 (const char *s
)
19 return strnlen (s
); /* { dg-warning "too few arguments to built-in function 'strnlen'" } */
22 size_t f2 (const char *s
)
24 return strnlen (s
, s
); /* { dg-warning "\\\[-Wint-conversion]" } */
27 #if __SIZEOF_INT128__ == 16
29 size_t fi128 (const char *s
, __int128_t n
)
34 /* PR middle-end/89957 */
35 return strnlen (s
, n
); /* { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" "int128" { target int128 } } */
40 /* { dg-prune-output "\\\[-Wint-conversion]" } */