1  /* { dg-additional-options "-Wl,-u,_printf_float" { target newlib_nano_io } } */
       2  
       3  #include <stdio.h>
       4  char buf[2];
       5  
       6  f (fp)
       7       int (*fp)(char *, const char *, ...);
       8  {
       9    (*fp)(buf, "%.0f", 5.0);
      10  }
      11  
      12  main ()
      13  {
      14    f (&sprintf);
      15    if (buf[0] != '5' || buf[1] != 0)
      16      abort ();
      17    exit (0);
      18  }