public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/95141] [8/9/10/11 Regression] Incorrect integer overflow warning message for bitand expression Date: Wed, 20 May 2020 07:40:14 +0000 [thread overview] Message-ID: <bug-95141-4-x0TybM1yu7@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95141-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95141 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:4a88caf21a0a85129f6c985ca13ba3eb54ff5366 commit r11-509-g4a88caf21a0a85129f6c985ca13ba3eb54ff5366 Author: Richard Biener <rguenther@suse.de> Date: Tue May 19 07:58:33 2020 +0200 c/95141 - fix bogus integer overflow warning 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. 2020-05-30 Richard Biener <rguenther@suse.de> PR c/95141 gcc/c * c-fold.c (c_fully_fold_internal): Enhance guard on overflow_warning. gcc/testsuite * gcc.dg/pr95141.c: New testcase.
next prev parent reply other threads:[~2020-05-20 7:40 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-14 19:51 [Bug c/95141] New: " yadongh at vt dot edu 2020-05-15 7:30 ` [Bug c/95141] [8/9/10/11 Regression] " jakub at gcc dot gnu.org 2020-05-15 9:02 ` rguenth at gcc dot gnu.org 2020-05-18 13:28 ` rguenth at gcc dot gnu.org 2020-05-20 7:40 ` cvs-commit at gcc dot gnu.org [this message] 2020-05-20 7:42 ` [Bug c/95141] [8/9/10 " rguenth at gcc dot gnu.org 2020-06-23 11:06 ` cvs-commit at gcc dot gnu.org 2020-06-23 11:08 ` [Bug c/95141] [8/9 " rguenth at gcc dot gnu.org 2021-05-14 9:53 ` [Bug c/95141] [9 " jakub at gcc dot gnu.org 2021-06-01 8:17 ` rguenth at gcc dot gnu.org 2022-05-27 8:52 ` rguenth at gcc dot gnu.org
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=bug-95141-4-x0TybM1yu7@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).