On Fri, Aug 16, 2024 at 4:30 PM Torbjorn SVENSSON
<torbjorn.svens...@foss.st.com> wrote:
>
>
>
> On 2024-08-16 16:07, Jeff Law wrote:
> >
> >
> > On 8/16/24 4:12 AM, Torbjörn SVENSSON wrote:
> >> Ok for trunk and releases/gcc-14?
> >>
> >> Verified this on x86_64 and arm-none-eabi.
> >> Don't know if the other "truth type" dg-lines can be removed as well.
> >>
> >> --
> >>
> >> On Cortex-M55 with MVE, the test case fails due to -INT_MAX being
> >> undefined. Adding -fwrapv solves the issues.
> >>
> >> Regtested on x86_64-pc-linux and arm-none-eabi for
> >> Cortex-M0/M3/M4/M7/M33/M55/M85/A7.
> >>
> >> gcc/testsuite/ChangeLog:
> >>
> >>     * gcc.dg/signbit-5.c: Add -fwrapv and remove x86 exception.
> > Presumably the -x[i] when i == 0 cases?   I'm a bit surprised that doing
> > a -INT_MIN didn't produce -INT_MIN, but it's still a bad thing to do due
> > to the overflow.
>
> On the Cortex-M55 with MVE, -INT_MIN will result in INT_MIN, i.e. a
> large negative value. The negated INT_MIN value cannot be represented
> using the two complement form with the same number of bits.

Note this is what should happen everywhere.  I think the testcase should simply
avoid this special value - not sure why it was written this way.  We shouldn't
turn the test into -fwrapv only.  Tamar, why did you cover negating
INT_MIN here?
Can we use INT_MIN + 1 instead?

Richard.

>
> > So, OK for the trunk and release branches.  If we need to adjust risc-v
> > we'll know if a few days :-)
>
> Ok.
>
>
> Pushed as r15-2950 and r14-10592.
>
> Kind regards,
> Torbjörn

Reply via email to