On Fri, Aug 7, 2026 at 2:57 AM Roger Sayle <[email protected]> wrote:
>
>
> > From: Alexander Monakov <[email protected]>
> > Sent: 07 August 2026 08:45
> > On Wed, 5 Aug 2026, Roger Sayle wrote:
> >
> > > gcc/testsuite/ChangeLog
> > >         PR tree-optimization/126467
> > >         * gcc.dg/pr126467-1.c: New test case.
> > >         * gcc.dg/pr126467-2.c: Likewise.
> > >         * gcc.dg/pr96392.c: Fix incorrect test case.
> >
> > Sorry, what is incorrect in this testcase? x is an int there:
> >
> > -double negate(int x)
> > -{
> > -  return 0.0 - x;
> > -}
>
> Hi Alexander,
> Yes, x is an int, so when promoted to double (because of the 0.0)
> it becomes +0.0, and as described +0.0 - +0.0 is not the same
> as -(double)0.  Interestingly, I ran "git blame" to figure out which
> misguided fool wrote this test case... It turns out it was me.
> Live and learn.
>
> Short answer, this test case now fails with this (any) fix
> for PR tree-optimization/126467.

That is until finalized ranger support is hooked up to say int->fp
conversion does not produce -0.0.
This is being worked on.
Can you add a separate testcase and xfail currently?

Thanks,
Andrea

>
> Thanks for your help/feedback.
> Roger
> --
>
>

Reply via email to