1 /* PR tree-optimization/83198 */
2 /* { dg-do compile { target __float128 } } */
3 /* { dg-options "-O2 -fprintf-return-value -Wno-format -fdump-tree-optimized" } */
4 /* { dg-add-options __float128 } */
7 void link_error (void);
10 foo (char *x
, double y
)
12 /* The expected result should not be constant but rather that
13 of the %f directive with an unknown argument, i.e., at least
14 [3, 317] (but in reality [3, 322] when taking into account
15 that the decimal point can be up to MB_LEN_MAX bytes long). */
16 int a
= __builtin_sprintf (x
, "%f", 1.0Q
);
25 /* Verify we don't optimize return value to [3, 13]. */
26 /* { dg-final { scan-tree-dump-not "link_error \\(\\);" "optimized" } } */
27 /* { dg-final { scan-tree-dump "bar \\(\\);" "optimized" } } */