2 /* This test needs runtime that provides __*_chk functions. */
3 /* { dg-do run { target *-*-linux* *-*-gnu* *-*-uclinux* } } */
4 /* { dg-options "-O2 -std=c99" } */
6 #define FORTIFY_SOURCE 2
10 static char buf
[4096];
11 static char gfmt
[] = "%Lg";
13 static int __attribute__ ((noipa
))
14 foo (char *str
, const char *fmt
, ...)
19 ret
= vsnprintf (str
, 4096, fmt
, ap
);
27 long double dval
= 128.0L;
28 int ret
= foo (buf
, gfmt
, dval
);
29 if (ret
!= 3 || __builtin_strcmp (buf
, "128") != 0)