Subject: 28.0.50; [native-comp] (lambda (x) (if (equal x b) (eq x b) (error ""))) miscompiled
From: Pip Cet <[email-masked]>
To: [email-masked]
Date: Mon, 1 Mar 2021 06:51:30 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

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