gcc/testsuite/gcc.dg/tree-ssa/pr78605.c
raw| 1 | /* PR middle-end/78605 - bogus -Wformat-overflow=1 with %f |
| 2 | { dg-do compile } |
| 3 | { dg-options "-O2 -Wall -Wextra -Wformat-overflow=1" } */ |
| 4 | |
| 5 | char d[10]; |
| 6 | |
| 7 | int f (int i) |
| 8 | { |
| 9 | return __builtin_sprintf (d, "%i %i", i, i); |
| 10 | } |
| 11 | |
| 12 | int g (float f) |
| 13 | { |
| 14 | return __builtin_sprintf (d, "%.2f %.2f", f, f); |
| 15 | } |