Commit bd1f3566 by Martin Sebor Committed by Martin Sebor

PR tree-optimization/86571 - AIX NaNQ and NaNS output format conflicts with __builtin_sprintf

gcc/ChangeLog:

	PR tree-optimization/86571
	* gimple-ssa-sprintf.c (format_floating): Extend upper bound of
	NaN output to 4.

From-SVN: r263312
parent 3d3e5ba2
2018-08-04 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86571
* gimple-ssa-sprintf.c (format_floating): Extend upper bound of
NaN output to 4.
2018-08-03 Sandra Loosemore <sandra@codesourcery.com> 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
* config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
......
...@@ -2014,8 +2014,15 @@ format_floating (const directive &dir, tree arg, vr_values *) ...@@ -2014,8 +2014,15 @@ format_floating (const directive &dir, tree arg, vr_values *)
res.range.likely = res.range.min; res.range.likely = res.range.min;
res.range.max = res.range.min; res.range.max = res.range.min;
/* The inlikely maximum is "[-/+]infinity" or "[-/+]nan". */ /* The unlikely maximum is "[-/+]infinity" or "[-/+][qs]nan".
res.range.unlikely = sign + (real_isinf (rvp) ? 8 : 3); For NaN, the C/POSIX standards specify two formats:
"[-/+]nan"
and
"[-/+]nan(n-char-sequence)"
No known printf implementation outputs the latter format but AIX
outputs QNaN and SNaN for quiet and signalling NaN, respectively,
so the unlikely maximum reflects that. */
res.range.unlikely = sign + (real_isinf (rvp) ? 8 : 4);
/* The range for infinity and NaN is known unless either width /* The range for infinity and NaN is known unless either width
or precision is unknown. Width has the same effect regardless or precision is unknown. Width has the same effect regardless
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment