From: Eric Botcazou <botcazou@adacore.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Jeff Law <jeffreyalaw@gmail.com>,
Richard Biener <rguenther@suse.de>,
gcc-patches@gcc.gnu.org, Zhao Wei Liew <zhaoweiliew@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] match.pd: Fix up 1 / X for unsigned X optimization [PR104280]
Date: Mon, 31 Jan 2022 09:16:43 +0100 [thread overview]
Message-ID: <3158064.44csPzL39Z@fomalhaut> (raw)
In-Reply-To: <20220129162334.GV2646553@tucnak>
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
> Unfortunately this breaks quite a lot of things.
Right, for example in Ada where we now happily turn a division by zero, which
should raise an exception with -gnatp, into nonsense. Do we really need this
rather useless optimization in GCC? Blindly mimicing LLVM is not a reason...
I have installed the attached testcase, which now fails because of the change.
* gnat.dg/div_zero.adb: New test.
--
Eric Botcazou
[-- Attachment #2: div_zero.adb --]
[-- Type: text/x-adasrc, Size: 471 bytes --]
-- { dg-do run }
-- This test requires architecture- and OS-specific support code for unwinding
-- through signal frames (typically located in *-unwind.h) to pass. Feel free
-- to disable it if this code hasn't been implemented yet.
procedure Div_Zero is
pragma Suppress (All_Checks);
function Zero return Integer is
begin
return 0;
end;
D : Integer := Zero;
begin
D := 1 / D;
raise Program_Error;
exception
when Constraint_Error => null;
end;
next prev parent reply other threads:[~2022-01-31 8:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 18:42 [PATCH v3] match.pd: Simplify 1 / X for integer X [PR95424] Zhao Wei Liew
2022-01-28 18:38 ` Jeff Law
2022-01-29 16:23 ` [PATCH] match.pd: Fix up 1 / X for unsigned X optimization [PR104280] Jakub Jelinek
2022-01-29 16:48 ` Jeff Law
2022-01-30 2:28 ` Zhao Wei Liew
2022-01-30 2:38 ` Andrew Pinski
2022-01-31 8:33 ` Richard Biener
2022-01-31 8:16 ` Eric Botcazou [this message]
2022-02-02 22:58 ` Andrew Pinski
2022-02-02 23:01 ` Eric Botcazou
2022-02-03 7:16 ` Richard Biener
2022-02-03 9:06 ` Eric Botcazou
2022-02-03 9:33 ` Jakub Jelinek
2022-02-03 9:40 ` Richard Biener
2022-02-03 9:55 ` Jakub Jelinek
2022-02-03 11:03 ` Richard Biener
2022-02-03 11:18 ` Jakub Jelinek
2022-02-03 12:13 ` Richard Biener
2022-02-03 12:22 ` Jakub Jelinek
2022-02-03 12:24 ` Eric Botcazou
2022-02-03 9:49 ` Eric Botcazou
2022-02-04 9:53 ` Eric Botcazou
2022-02-04 10:07 ` Jakub Jelinek
2022-02-04 10:14 ` Eric Botcazou
2022-02-04 10:26 ` Jakub Jelinek
2022-02-04 10:29 ` Jakub Jelinek
2022-01-31 8:28 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3158064.44csPzL39Z@fomalhaut \
--to=botcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=jeffreyalaw@gmail.com \
--cc=rguenther@suse.de \
--cc=zhaoweiliew@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).