From unknown Tue Sep 09 13:20:28 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#46843 <46843@debbugs.gnu.org> To: bug#46843 <46843@debbugs.gnu.org> Subject: Status: 28.0.50; [native-comp] (lambda (x) (if (equal x b) (eq x b) (error ""))) miscompiled Reply-To: bug#46843 <46843@debbugs.gnu.org> Date: Tue, 09 Sep 2025 20:20:28 +0000 retitle 46843 28.0.50; [native-comp] (lambda (x) (if (equal x b) (eq x b) (= error ""))) miscompiled reassign 46843 emacs submitter 46843 Pip Cet severity 46843 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 01 01:52:13 2021 Received: (at submit) by debbugs.gnu.org; 1 Mar 2021 06:52:13 +0000 Received: from localhost ([127.0.0.1]:47890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGcPc-0008GD-OX for submit@debbugs.gnu.org; Mon, 01 Mar 2021 01:52:12 -0500 Received: from lists.gnu.org ([209.51.188.17]:56154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGcPa-0008G4-BY for submit@debbugs.gnu.org; Mon, 01 Mar 2021 01:52:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGcPa-0006tf-3Y for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 01:52:10 -0500 Received: from mail-oo1-xc34.google.com ([2607:f8b0:4864:20::c34]:39124) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGcPY-0001rZ-F9 for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 01:52:09 -0500 Received: by mail-oo1-xc34.google.com with SMTP id i11so2212155ood.6 for ; Sun, 28 Feb 2021 22:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=b752QdvTFiz9C3lIdMdBOP6YKUKjvAAACk+apX2ENKI=; b=Rr9WiRiHezQIvJjWBsnq0pZAGV8dIBSezhxn03N1DgwxRMdJC8KD3GwgYBuuBDpP91 Cc6aqT9RrjClyTEweeV1HVUzWYIesqXGxpEewXltdpD1b0Bg6h0Dlvpi/Jvdfq+625bL xw1fSkV9teAPwi6S3gtwhJjd6fW+V5Do0Jvfvwmk9D+6+42Zh/uOlQ8e+rjYDSvk+iuo CRhJbdW+vDfa0eu/STGhxL1vVcDdKOiCyP51nfW7Wc0dP+sucqEiTjMwvov+TftbJENH X9WLwye3ne8dH5xw/kEKHY4VG9qjNT+3Vj5Vs6lwaZAvXTWEUsVFjuDkZ6BHlzLt0Snd cMsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=b752QdvTFiz9C3lIdMdBOP6YKUKjvAAACk+apX2ENKI=; b=LFb7Q3gSPorOC6VUyqWe/cnvIZsrnq0Gg7mf1m7Hqd1zmnSJSISsNh/8aFgalYcyme UKnA6opAzd+se69Keyu0psEeewaMQoVpwBAcUfwzVxePaNF/lTigUXvB5/GCAoy7Yqi9 5BEgoie7l57qPmZAL3rab/xXsJ7IitJB7UR/aMDIJ5xFaY33b3x5xO5ub/6ANHr59AR0 ICYuON2cLE/HNmbG7I6nmYZLfWFLiVDofTBJcOV1MzlhdorKHct0F6UPvwxwrCbGMCMm rm3rhhNY7C1W6z2ltW6HgfeQRV50br3UFw7Qjgjmsck9Dp9vP1FTcMcPJ+Vp/SjVF8sO 2xZw== X-Gm-Message-State: AOAM530ru+p56vvD+6geQYevhEenXjf97Vu616d6v/HJl3NJjFMLNlCK dikwJ50u6xPZbcvVAfpbnQiuaNltrvkf1+aR9mJzKJXSjA2CIg== X-Google-Smtp-Source: ABdhPJwz/Zp848c9ru2UI3ORzYvh/CoL19aWm8k+oE/IK4GlEmIsEWN3+5hMk6R+AnglV29I+qPnE1tbkvaaYRjLmqs= X-Received: by 2002:a4a:2a0a:: with SMTP id k10mr11498665oof.88.1614581526898; Sun, 28 Feb 2021 22:52:06 -0800 (PST) MIME-Version: 1.0 From: Pip Cet Date: Mon, 1 Mar 2021 06:51:30 +0000 Message-ID: Subject: 28.0.50; [native-comp] (lambda (x) (if (equal x b) (eq x b) (error ""))) miscompiled To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::c34; envelope-from=pipcet@gmail.com; helo=mail-oo1-xc34.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 01 03:09:25 2021 Received: (at 46843) by debbugs.gnu.org; 1 Mar 2021 08:09:25 +0000 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 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 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) MIME-Version: 1.0 References: In-Reply-To: From: Pip Cet Date: Mon, 1 Mar 2021 08:08:42 +0000 Message-ID: Subject: Re: bug#46843: 28.0.50; [native-comp] (lambda (x) (if (equal x b) (eq x b) (error ""))) miscompiled To: 46843@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46843 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 01 04:08:13 2021 Received: (at 46843) by debbugs.gnu.org; 1 Mar 2021 09:08:13 +0000 Received: from localhost ([127.0.0.1]:48030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGeXF-00035V-CP for submit@debbugs.gnu.org; Mon, 01 Mar 2021 04:08:13 -0500 Received: from mx.sdf.org ([205.166.94.24]:61341) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGeXE-00035M-Lk for 46843@debbugs.gnu.org; Mon, 01 Mar 2021 04:08:13 -0500 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 12198B25000827 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Mon, 1 Mar 2021 09:08:12 GMT From: Andrea Corallo To: Pip Cet Subject: Re: bug#46843: 28.0.50; [native-comp] (lambda (x) (if (equal x b) (eq x b) (error ""))) miscompiled References: Date: Mon, 01 Mar 2021 09:08:11 +0000 In-Reply-To: (Pip Cet's message of "Mon, 1 Mar 2021 06:51:30 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46843 Cc: 46843@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Pip Cet 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. Andrea From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 01 12:26:37 2021 Received: (at submit) by debbugs.gnu.org; 1 Mar 2021 17:26:37 +0000 Received: from localhost ([127.0.0.1]:50709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGmJY-0007vF-VV for submit@debbugs.gnu.org; Mon, 01 Mar 2021 12:26:37 -0500 Received: from lists.gnu.org ([209.51.188.17]:43544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGmJX-0007v7-8n for submit@debbugs.gnu.org; Mon, 01 Mar 2021 12:26:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGmJX-0005oP-37 for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 12:26:35 -0500 Received: from mx.sdf.org ([205.166.94.24]:60755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGmJV-0002Ta-Aw for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 12:26:34 -0500 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 121HQTjo021232 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Mon, 1 Mar 2021 17:26:29 GMT From: Andrea Corallo To: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#46843: 28.0.50; [native-comp] (lambda (x) (if (equal x b) (eq x b) (error ""))) miscompiled References: Date: Mon, 01 Mar 2021 17:26:29 +0000 In-Reply-To: (Andrea Corallo via's message of "Mon, 01 Mar 2021 09:08:11 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=205.166.94.24; envelope-from=akrl@sdf.org; helo=mx.sdf.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 46843-done@debbugs.gnu.org, Pip Cet X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Pip Cet 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 From unknown Tue Sep 09 13:20:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 30 Mar 2021 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator