From: Joseph Myers <joseph@codesourcery.com>
To: Richard Biener <rguenther@suse.de>
Cc: <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][C] c/95141 - fix bogus integer overflow warning
Date: Tue, 19 May 2020 19:02:11 +0000 [thread overview]
Message-ID: <alpine.DEB.2.21.2005191857230.10766@digraph.polyomino.org.uk> (raw)
In-Reply-To: <nycvar.YFH.7.76.2005190802350.4397@zhemvz.fhfr.qr>
On Tue, 19 May 2020, Richard Biener wrote:
> This fixes an integer overflow warning that ultimatively happens because
> of TREE_OVERFLOW propagating through transforms and the existing guard
> against this,
>
> 375 if (TREE_OVERFLOW_P (ret)
> 376 && !TREE_OVERFLOW_P (op0)
> 377 && !TREE_OVERFLOW_P (op1))
> 378 overflow_warning (EXPR_LOC_OR_LOC (expr, input_location,
>
> being insufficient. Rather than trying to use sth like walk_tree to
> exhaustively walk operands (with the possibility of introducing
> quadraticness when folding larger expressions recursively) the
> following amends the above with an ad-hoc test for a binary op0
> with a possibly constant op1.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, OK?
OK.
The test in bug 32643 looks vaguely similar, but that's an older
regression, do I take it this patch doesn't help with that one?
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2020-05-19 19:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 6:03 Richard Biener
2020-05-19 19:02 ` Joseph Myers [this message]
2020-05-20 7:31 ` 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=alpine.DEB.2.21.2005191857230.10766@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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).