1  /* { dg-lto-do run } */
       2  
       3  #include <stdarg.h>
       4  #include <stdio.h>
       5  #include <string.h>
       6  
       7  char *
       8  myprintf (const char *fmt, ...)
       9  {
      10    va_list args;
      11    static char buf[80];
      12  
      13    va_start (args, fmt);
      14    (void) vsnprintf (buf, sizeof (buf), fmt, args);
      15    va_end (args);
      16    return buf;
      17  }
      18  
      19  int
      20  main ()
      21  {
      22    char *s;
      23  
      24    s = myprintf ("%s: %d\n", "foo", 1);
      25    return strcmp (s, "foo: 1\n") != 0;
      26  }