From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#46540: 28.0.50; Native-comp optimization bug Date: Tue, 16 Feb 2021 21:43:29 +0000 Message-ID: References: Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9646"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: qythium@gmail.com To: 46540@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 16 22:44:11 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 1lC88g-0002P4-KU for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Feb 2021 22:44:10 +0100 Original-Received: from localhost ([::1]:47298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lC88f-0005TB-Nj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Feb 2021 16:44:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lC88Y-0005Sh-Rj for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 16:44:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58533) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lC88Y-00068D-KV for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 16:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lC88Y-0007PD-HO for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 16:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Feb 2021 21:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46540 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: 46540@debbugs.gnu.org, Yu Han Quek Original-Received: via spool by submit@debbugs.gnu.org id=B.161351181728428 (code B ref -1); Tue, 16 Feb 2021 21:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Feb 2021 21:43:37 +0000 Original-Received: from localhost ([127.0.0.1]:41846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lC889-0007OS-BW for submit@debbugs.gnu.org; Tue, 16 Feb 2021 16:43:37 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:48860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lC888-0007OL-53 for submit@debbugs.gnu.org; Tue, 16 Feb 2021 16:43:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lC887-0005PN-Th for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 16:43:35 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:63478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lC884-00065F-U0 for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 16:43:35 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 11GLhThc005737 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Tue, 16 Feb 2021 21:43:29 GMT In-Reply-To: (Andrea Corallo via's message of "Mon, 15 Feb 2021 20:08:54 +0000") 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-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:200161 Archived-At: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Yu Han Quek writes: > >> The following function gives an incorrect result when compiled natively >> with comp-speed >= 2. >> >> ;; -*- lexical-binding: t; -*- >> >> (defun native-comp-bug (body) >> (let ((x (car body)) >> (y (cadr body))) >> (unless (and >> (natnump x) >> (natnump y) >> (<= x y)) >> (error "")) >> x)) > > Cool thanks for the reduced reproducer! > > I'll have a in the coming days. > > Andrea Ok here a slightly simplified reproducer: ;; -*- lexical-binding: t; -*- (defun native-comp-bug (x y) (if (and (natnump x) (natnump y) (<= x y)) x (error ""))) The following constrain insn clearly resolves in the wrong way: (assume #(mvar 79140560 0 (integer 0 0)) (<= #(mvar 79118120 0 (integer 0 *)) #(mvar 79118988 3 (integer 0 *)))) Will come-up with a fix. Andrea