Fix bogus builtin-sprintf-warn-{3,10}.c failures for avr.
authorSenthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
Tue, 11 Apr 2017 05:09:41 +0000 (05:09 +0000)
committerSenthil Kumar Selvaraj <saaadhu@gcc.gnu.org>
Tue, 11 Apr 2017 05:09:41 +0000 (05:09 +0000)
commitabde687ac31890d073a6e769b19ef3ad5d9433a2
tree83d909eb9d35576473abdde5ed503a04cac832ad
parentb75179f367576ba1e10c7d38fc9089f2d4f7faed
Fix bogus builtin-sprintf-warn-{3,10}.c failures for avr.

This patch fixes a whole bunch of failures reported for
gcc.dg/tree-ssa/builtin-sprintf-warn-{3,10}.c for the avr target.

builtin-sprintf-warn-10.c fails because the bounds in the warning
messages expect 4 digit wide exponents i.e. __DBL_MAX_EXP__ > 999.
For the avr, floats and doubles are both 32 bits wide, __DBL_MAX_EXP__
== 128, and the max number of exponent digits can only be 3 .
The computed size thus ends up one short of the value the test
expects. The patch makes the test run only for targets with double64plus.

builtin-sprintf-warn-3.c fails because the test appears to assume all
non lp64 targets to be ilp32. For the avr, pointer size and int size
are equal, but both are 16 bits, not 32. The patch fixes this by
explicitly adding avr to the dejagnu selector.

gcc/testsuite

2017-04-06  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

* gcc.dg/tree-ssa/builtin-sprintf-warn-10.c: Require double64plus.
* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c (void test_too_large):
Add avr-*-* to non-lp64 selector.

From-SVN: r246831
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-10.c
gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-3.c