From: Martin Sebor Date: Mon, 9 Jan 2017 23:31:38 +0000 (+0000) Subject: PR testsuite/79036 - gcc.dg/tree-ssa/builtin-sprintf.c fails starting with r244037 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dfa6951fdc5a4e840aa9974dd8179ffebf8f0593;p=gcc.git PR testsuite/79036 - gcc.dg/tree-ssa/builtin-sprintf.c fails starting with r244037 PR testsuite/79036 - gcc.dg/tree-ssa/builtin-sprintf.c fails starting with r244037 gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/builtin-sprintf.c: Handle extended formats with different precisions. From-SVN: r244250 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 724763f6513..1054e201b8b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-01-09 Martin Sebor + + PR testsuite/79036 + * gcc.dg/tree-ssa/builtin-sprintf.c: Handle extended formats + with different precisions. + 2017-01-09 Eric Botcazou * g++.dg/opt/call2.C: New test. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c index 275cb284ff2..7757d5ea154 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c @@ -714,7 +714,16 @@ test_g_long_double (void) EQL ( 10, 11, "%Lg", 1.0L / 512); /* Numbers that are not exactly representable. */ +#if __LDBL_DIG__ < 31 + /* x86_64, for example, represents 0.1 as 1.000000...1...e-1 + and formats it as either "0.1" (when rounded down) or "0.100001" + (rounded up). */ RNG ( 3, 8, 9, "%Lg", 0.1L); +#else + /* powerpc64 represents 0.1 as 9.999999...6e-2 and formats it + as "0.0999999" (rounded down) or "0.1" (rounded up). */ + RNG ( 3, 9, 10, "%Lg", 0.1L); +#endif RNG ( 4, 8, 9, "%Lg", 0.12L); RNG ( 5, 8, 9, "%Lg", 0.123L); RNG ( 6, 8, 9, "%Lg", 0.1234L);