From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#62537: Error compiling emacs master with native compilation activated Date: Wed, 05 Apr 2023 21:12:09 +0000 Message-ID: References: <664DC8F8-EEEC-4A90-A4F5-86C11378486C@acm.org> <8CD7FA80-0E05-4112-A063-8F49F6A28CD4@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15966"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Eli Zaretskii , 62537@debbugs.gnu.org, Pedro Andres Aranda Gutierrez To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 05 23:13:28 2023 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 1pkARb-00041Y-KU for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Apr 2023 23:13:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkARE-0002WG-8w; Wed, 05 Apr 2023 17:13:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkARC-0002W5-SS for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 17:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkARC-0000oh-5B for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 17:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pkARB-0001CN-Ia for bug-gnu-emacs@gnu.org; Wed, 05 Apr 2023 17:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Apr 2023 21:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62537 X-GNU-PR-Package: emacs Original-Received: via spool by 62537-submit@debbugs.gnu.org id=B62537.16807291474560 (code B ref 62537); Wed, 05 Apr 2023 21:13:01 +0000 Original-Received: (at 62537) by debbugs.gnu.org; 5 Apr 2023 21:12:27 +0000 Original-Received: from localhost ([127.0.0.1]:52780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkAQc-0001BU-Rz for submit@debbugs.gnu.org; Wed, 05 Apr 2023 17:12:27 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:64399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkAQa-0001BF-Ui for 62537@debbugs.gnu.org; Wed, 05 Apr 2023 17:12:25 -0400 Original-Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.16.1/8.14.5) with ESMTPS id 335LC8So023126 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Wed, 5 Apr 2023 21:12:16 GMT In-Reply-To: <8CD7FA80-0E05-4112-A063-8F49F6A28CD4@acm.org> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Wed, 5 Apr 2023 22:51:01 +0200") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259290 Archived-At: Mattias Engdeg=C3=A5rd writes: > 5 apr. 2023 kl. 19.19 skrev Andrea Corallo : > >> As we suspected was a bug in the native compiler limplification pass >> triggered by the new LAP emitted. >>=20 >> fa669c4b17c fixes bootstrap --with-native-compilation=3Daot here and adds >> a test, is now pushed to master. In 29 the bug never showed up >> (probably because the new LAP tweak is not it) so I guess it's better to >> leave the code as it is. > > Nice! So the bug was that we optimised away switches where all jump targe= ts are the same, without considering the fall-through case? Hi Mattias, yep that's correct :) > (Perhaps we should do something like that in the LAP optimiser. Wonder ho= w common the opportunity is though.) Yeah might be a good idea even if I don't know how common this condition is. (We might count how many times `comp-jump-table-optimizable' returns t in an aot build tho to get an idea). > By the way, the bulk of `comp-jump-table-optimizable` should be equivalen= t to something like > > (apply #'=3D (hash-table-values jmp-table)) > > which is arguably clearer and definitely shorter. True but with the downside that it conses. I'll think about if I want to change it, thanks for the neat suggestion tho :) Best Regards Andrea