PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / pr62090.c
blob53089cf1932d6f2382eb4f91d061fae472877b06
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 long a;
5 int *b;
6 extern __inline __attribute__ ((__always_inline__))
7 __attribute__ ((__gnu_inline__)) int sprintf (int *p1, char *p2, ...)
9 a = __builtin_object_size (0, 0);
10 return __builtin___sprintf_chk (0, 0, a, p2, __builtin_va_arg_pack ());
13 void
14 log_bad_request ()
16 b += sprintf (0, "foo");