This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, testsuite] Fix failing builtin-sprintf-warn-{3,10}.c for avr
- From: Mike Stump <mikestump at comcast dot net>
- To: Senthil Kumar Selvaraj <senthilkumar dot selvaraj at microchip dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 10 Apr 2017 09:54:57 -0700
- Subject: Re: [Patch, testsuite] Fix failing builtin-sprintf-warn-{3,10}.c for avr
- Authentication-results: sourceware.org; auth=none
- References: <87a87tvizo.fsf@microchip.com>
On Apr 6, 2017, at 5:05 AM, Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com> wrote:
> 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.
Ok.
> 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.
Ok.