From: Florian Weimer <fweimer@redhat.com>
To: Siddhesh Poyarekar <siddhesh@gotplt.org>
Cc: Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
Joe Simmons-Talbott <josimmon@redhat.com>,
"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: Re: [PATCH v2 0/3] Add tests for abs(), labs(), llabs() (BZ #30263)
Date: Tue, 16 May 2023 22:52:58 +0200 [thread overview]
Message-ID: <87o7mk3snp.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <128baa96-3c01-42d9-263c-664548ebbf73@gotplt.org> (Siddhesh Poyarekar's message of "Tue, 16 May 2023 14:58:34 -0400")
* Siddhesh Poyarekar:
> On 2023-05-04 08:53, Wilco Dijkstra via Libc-alpha wrote:
>> Hi Joe,
>>
>>> Add testcases for abs(), labs(), and llabs(). Test the bounds of the
>>> given type, zero, and part of the full range of values for labs() and
>>> llabs(). Test the full range for abs().
>>>
>>> Changes in V2:
>>> Reduce number of iterations by using a prime interval. For llabs() test
>>> the 32bit crossover point.
>> v2 looks good to me.
>> Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
>
> I've pushed these now.
This breaks on various 32-bit architectures. As seen on microblaze:
tst-llabs.c: In function ‘do_test’:
tst-llabs.c:40:12: error: overflow in conversion from ‘long long int’ to ‘long int’ changes value from ‘-9223372036854775807’ to ‘1’ [-Werror=overflow]
40 | for (i = LLONG_MIN + 1; i < LLONG_MIN + INT_MAX; i += LARGE_PRIME)
| ^~~~~~~~~
tst-llabs.c:43:12: error: overflow in conversion from ‘long long int’ to ‘long int’ changes value from ‘9223372034707292160’ to ‘-2147483648’ [-Werror=overflow]
43 | for (i = LLONG_MAX - INT_MAX; i < LLONG_MAX - LARGE_PRIME; i += LARGE_PRIME)
| ^~~~~~~~~
cc1: all warnings being treated as errors
Thanks,
Florian
prev parent reply other threads:[~2023-05-16 20:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 13:57 Joe Simmons-Talbott
2023-04-04 13:57 ` [PATCH v2 1/3] stdlib: Add testcases for abs(). " Joe Simmons-Talbott
2023-04-04 13:57 ` [PATCH v2 2/3] stdlib: Add testcases for labs(). " Joe Simmons-Talbott
2023-04-04 13:57 ` [PATCH v2 3/3] stdlib: Add testcases for llabs(). " Joe Simmons-Talbott
2023-04-19 14:23 ` [PATCH v2 0/3] Add tests for abs(), labs(), llabs() " Joe Simmons-Talbott
2023-04-26 16:38 ` Joe Simmons-Talbott
2023-05-04 12:53 ` Wilco Dijkstra
2023-05-16 18:58 ` Siddhesh Poyarekar
2023-05-16 20:52 ` Florian Weimer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o7mk3snp.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=Wilco.Dijkstra@arm.com \
--cc=josimmon@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=siddhesh@gotplt.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).