GNU bug report logs - #46812
28.0.50; [native-comp] (lambda (x) (if (= x 0.0) (floatp x) (error ""))) miscompiled

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> gmail.com>

Date: Sat, 27 Feb 2021 13:54:01 UTC

Severity: normal

Found in version 28.0.50

Done: Andrea Corallo <akrl <at> sdf.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 46812 <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> gmail.com>
To: 46812 <at> debbugs.gnu.org
Subject: Re: bug#46812: 28.0.50; [native-comp] (lambda (x) (if (= x 0.0)
 (floatp x) (error ""))) miscompiled
Date: Sat, 27 Feb 2021 13:57:35 +0000
On Sat, Feb 27, 2021 at 1:54 PM Pip Cet <pipcet <at> gmail.com> wrote:
> In *scratch*, evaluate
>
> (funcall (native-compile `(lambda (x) (if (= x 0.0) (floatp x) (error "")))) 0)
>
> Expected Result:
>
> nil
>
> Actual Result:
>
> t
>
> [Note that this depends on lexical binding being in effect]

This arose from a discussion in bug#46670, and the relevant comment
with a fix (which unfortunately disables some correct optimizations in
addition to the incorrect ones) is at
https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-02/msg01630.html.

It's important we fix this correctly, but I'm predicting we won't.

Pip




This bug report was last modified 4 years and 133 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.