2018-11-28 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr83198.c
blob856f2be07d5e989f41c978f44c2c3fdc0b48a6c8
1 /* PR tree-optimization/83198 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wall -Wno-format" } */
5 int
6 foo (char *d[6], int x)
8 int r = 0;
9 r += __builtin_sprintf (d[0], "%f", x);
10 r += __builtin_sprintf (d[1], "%a", x);
11 r += __builtin_sprintf (d[2], "%f", "foo");
12 r += __builtin_sprintf (d[3], "%a", "bar");
13 #ifdef __SIZEOF_FLOAT128__
14 r += __builtin_sprintf (d[4], "%a", 1.0Q);
15 r += __builtin_sprintf (d[5], "%Lf", 1.0Q);
16 #endif
17 return r;