From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Haible Newsgroups: gmane.emacs.bugs Subject: bug#36370: 27.0.50; XFIXNAT called on negative numbers Date: Fri, 28 Jun 2019 14:29:00 +0200 Message-ID: <8538079.qoQZQqKKBW__38565.3595019662$1561726424$gmane$org@omega> References: <8979488.cRkkfcT1mV@omega> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="133784"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: KMail/5.1.3 (Linux/4.4.0-151-generic; KDE/5.18.0; x86_64; ; ) Cc: 36370@debbugs.gnu.org, Paul Eggert , bug-gnulib@gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 28 14:53:40 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hgqNl-000Ybo-UZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jun 2019 14:53:39 +0200 Original-Received: from localhost ([::1]:59458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgqNk-0004GT-BA for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jun 2019 08:53:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38819) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgqAG-0000gd-Jq for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 08:39:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgqAE-0006nQ-S5 for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 08:39:40 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55194) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hgqAD-0006mB-Vn for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 08:39:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hgq0w-0007iE-7h for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 08:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bruno Haible Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jun 2019 12:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36370 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36370-submit@debbugs.gnu.org id=B36370.156172494729565 (code B ref 36370); Fri, 28 Jun 2019 12:30:02 +0000 Original-Received: (at 36370) by debbugs.gnu.org; 28 Jun 2019 12:29:07 +0000 Original-Received: from localhost ([127.0.0.1]:40495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgq02-0007gm-W6 for submit@debbugs.gnu.org; Fri, 28 Jun 2019 08:29:07 -0400 Original-Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.52]:33294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgq00-0007gd-7D for 36370@debbugs.gnu.org; Fri, 28 Jun 2019 08:29:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1561724942; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=AXDdAkmWVg0AqsLsFlhtJqEIBdpIaBDF57n3RWIYw4I=; b=th12ECQ+Z81Y/r1Nv87CAWPKOYBXMLcb6huqm8IjURRFA9L+BAEu5OS7m/HAn1M2Jr JXt2WDyJby+28PQ7FiPYf7PMbadb7gUke3QeY4l6ySU805fREviGITV0O7gY7YlaJ6oa OhzZCuuBQHRDLomVG6Rm5jGJOVbJwHRa5/qs/A04hvY4RYpRidvMcTMqIM9exLwTUSJi kJ/eeC2NGHHWHBIb0P8IiMIhfwsCs8az0V/LY3+e1PSsl4cHgSaHnYu63TigIVs+l9ay bbZEJGYtdj6idAa6W+jwDI4V+OBjzJ7IHvk4rGpe1QWodw/YUEUqdWW+v4akxvFYILxN RXWQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0zJZW" X-RZG-CLASS-ID: mo00 Original-Received: from bruno.haible.de by smtp.strato.de (RZmta 44.24 DYNA|AUTH) with ESMTPSA id v018bcv5SCT1htS (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Fri, 28 Jun 2019 14:29:01 +0200 (CEST) In-Reply-To: <8979488.cRkkfcT1mV@omega> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161706 Archived-At: Oops, the test case that I meant to show is this one: ================================ foo.c ================================= #include #define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) //#define assume(R) (!__builtin_constant_p (!(R) == !(R)) || (R) ? (void) 0 : __builtin_unreachable ()) extern int complicated (int i); extern int nonnegative (int i); int f_generic (int i) { printf("%d\n", i & 0x80000000); return 0; } int f_condition (int i) { if (complicated (i) && nonnegative (i)) printf("%d\n", i & 0x80000000); return 0; } int f_assume (int i) { assume (complicated (i) && nonnegative (i)); printf("%d\n", i & 0x80000000); return 0; } ================================ bar.c ================================= int complicated (int i) { return (i & 7) == 3; } int nonnegative (int i) { return i >= 0; } ======================================================================== The results are as shown: the optimization in f_assume is performed with the old 'assume' definition, but not with the new one.