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
This commit is contained in:
Martin Sebor 2017-01-09 23:31:38 +00:00 committed by Martin Sebor
parent a271e41561
commit dfa6951fdc
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2017-01-09 Martin Sebor <msebor@redhat.com>
PR testsuite/79036
* gcc.dg/tree-ssa/builtin-sprintf.c: Handle extended formats
with different precisions.
2017-01-09 Eric Botcazou <ebotcazou@adacore.com>
* g++.dg/opt/call2.C: New test.

View File

@ -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);