aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr78605.c
blob: 141a12c3fd1f4d2b82558ba621d30b4887790ef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR middle-end/78605 - bogus -Wformat-overflow=1 with %f
   { dg-do compile }
   { dg-options "-O2 -Wall -Wextra -Wformat-overflow=1" } */

char d[10];

int f (int i)
{
  return __builtin_sprintf (d, "%i %i", i, i);
}

int g (float f)
{
  return __builtin_sprintf (d, "%.2f %.2f", f, f);
}