From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#46843: 28.0.50; [native-comp] (lambda (x) (if (equal x b) (eq x b) (error ""))) miscompiled Date: Mon, 1 Mar 2021 08:08:42 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11970"; mail-complaints-to="usenet@ciao.gmane.io" To: 46843@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 01 09:10:25 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGddI-00031E-Sb for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Mar 2021 09:10:24 +0100 Original-Received: from localhost ([::1]:41064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGddH-0004cc-VM for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Mar 2021 03:10:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGdcw-0004cW-Ik for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 03:10:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36425) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGdcw-0005pz-BE for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 03:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lGdcw-0001gh-5u for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 03:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Mar 2021 08:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46843 X-GNU-PR-Package: emacs Original-Received: via spool by 46843-submit@debbugs.gnu.org id=B46843.16145861656442 (code B ref 46843); Mon, 01 Mar 2021 08:10:02 +0000 Original-Received: (at 46843) by debbugs.gnu.org; 1 Mar 2021 08:09:25 +0000 Original-Received: from localhost ([127.0.0.1]:47971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGdcL-0001fq-Ke for submit@debbugs.gnu.org; Mon, 01 Mar 2021 03:09:25 -0500 Original-Received: from mail-ot1-f46.google.com ([209.85.210.46]:33000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGdcK-0001fe-Lv for 46843@debbugs.gnu.org; Mon, 01 Mar 2021 03:09:24 -0500 Original-Received: by mail-ot1-f46.google.com with SMTP id 40so7272810otu.0 for <46843@debbugs.gnu.org>; Mon, 01 Mar 2021 00:09:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=bgJ1n5ml5kjmGxBCE0KwThbUj4LoWucpGYp3BnfdJEk=; b=ukDbz3gzk908l+AOTdZ8x/4nGVzXZjpCiT7/QFG1ZHGYqSzBeL75Cp0p3cEQcY/sUs y6HnACZ0w2Kx3q+iW2kqqGiHECGflLyYV/tiQE7NX88hqRMuztlRhZk15Pq9KeUS8tW1 7a50bEdw9H6S0LqQnWI7vhZCtPkIY7/CeWWRpMSv9twhv5SrP6wt/JMqzoH2DO9Ssk1U p7hQn7vjHhTfDU2xlaeBarjTa7PsjgGtZWgICiHbpmBYlLSlNmC4bvXYHhsIJKqoYZAY LRcYrgIusArs1jSyHopuYjNa8I4DZBfGQyQB+XlqO/WDaTQxGwlqPD8wif/tynzZujpx yhpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=bgJ1n5ml5kjmGxBCE0KwThbUj4LoWucpGYp3BnfdJEk=; b=rfu5k2DaNW8B3O7GNnaMV+gIzGZE3A11T5O8uIoic5PRj64WZTPrNtkknZ34Tpp5cO 0+EnML40xjMezxkKuvzTMTRH/kKI8P5PxFF8gX8c0rWh3yF0j92uOzcwp5HhnwgyUrz8 AEvKkBxlJvsbtnrDFothRgv4C78RqxwGVlPihR1KcIrn5coZTPWFD762O56L2BYA2Krv nRopvxbLECnMdzfJZeQ0sSkQGrteN6rP6BDaAYbgcifor9vSgY3JJj8QNMWkIlskglM8 Zi1ZP6pfScHRf6VpdaJSlNXub6TEtbt/0T5C4Q5LDf72Xh++0zUYriI8Ieb1A6v9QIBG 1bkA== X-Gm-Message-State: AOAM53370VSsUeJZfxyMJhy5uyWgraUguxX2cTFNwte2QifVyej6Lnej VEgk8nxP7QS7xWPMKzgcSl8eea5EFEEMO4473B2BD32p6aY+aQ== X-Google-Smtp-Source: ABdhPJxSggMbCCBzgHhFd0jrzJpHmPJ6dRQ+H/M9qVyIlfpr8cuyhT7iGQ3mRCQlWY6TEy+NwxnNu/NE4YGkV1UrCCw= X-Received: by 2002:a9d:131:: with SMTP id 46mr12337758otu.287.1614586158823; Mon, 01 Mar 2021 00:09:18 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201062 Archived-At: On Mon, Mar 1, 2021 at 6:53 AM Pip Cet wrote: > > 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)) The same issue applies to eql. However, I had to convince myself first that there is valid and useful code that keeps track of the eq-uality of eql floats. There is, because there might be an eq-based hash table that uses them. (funcall (let* ((canonical-one 1.0) (hash (make-hash-table :test 'eq))) (puthash canonical-one t hash) (let* ((is-canonical-one `(lambda (x) (if (eql x ,canonical-one) (eq x ,canonical-one) (error ""))))) (setq is-canonical-one (native-compile is-canonical-one)) `(lambda (x) (if (funcall ',is-canonical-one x) (cl-assert (gethash x ',hash)))))) 1.0) is miscompiled to code that causes an assertion violation when it actually is correct code that verifies, in two different ways, that x is eq to a canonical float representing 1.0. Pip