all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 46843@debbugs.gnu.org
Cc: 46843-done@debbugs.gnu.org, Pip Cet <pipcet@gmail.com>
Subject: bug#46843: 28.0.50; [native-comp] (lambda (x) (if (equal x b) (eq x b) (error ""))) miscompiled
Date: Mon, 01 Mar 2021 17:26:29 +0000	[thread overview]
Message-ID: <xjfh7lubxa2.fsf@sdf.org> (raw)
In-Reply-To: <xjf1rczckck.fsf@sdf.org> (Andrea Corallo via's message of "Mon,  01 Mar 2021 09:08:11 +0000")

Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:

> Pip Cet <pipcet@gmail.com> writes:
>
>> In *scratch*, evaluate
>>
>> (funcall
>>  (let* ((lexical-binding t)
>>         (a (list 'a))
>>         (b (cons a a)))
>>    (native-compile
>>     `(lambda (x) (if (equal x ',b) (eq x ',b) (error "")))))
>>  '((a) a))
>>
>> Expected result:
>>
>> nil
>>
>> Actual result:
>>
>> t
>
> Thanks for reporting this, will come-up with a fix.

Right 3d014e1bf4 is fixing the wrong assumtion that `equal' `eql' can be
treated as `eq' in propagation as every immediate in the compilation
unit is hash consed.  Indeed this assumtion is wrong for more than one
reason.

Now under `equal' `eql' we propagate only fixnums and symbols values,
all the other kind of values are promoted to their respective types and
propagated as such.

The patch adds some tests for that too.

As the two reproducer are working here I'm closing this.

Thanks for reporting.

  Andrea





      reply	other threads:[~2021-03-01 17:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01  6:51 bug#46843: 28.0.50; [native-comp] (lambda (x) (if (equal x b) (eq x b) (error ""))) miscompiled Pip Cet
2021-03-01  8:08 ` Pip Cet
2021-03-01  9:08 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-01 17:26   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors [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=xjfh7lubxa2.fsf@sdf.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=46843-done@debbugs.gnu.org \
    --cc=46843@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=pipcet@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.