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 tree-optimization/97424] Warn on invalid shift amount after inlining Date: Thu, 12 Nov 2020 02:18:34 +0000 [thread overview] Message-ID: <bug-97424-4-tP4MuQCkgE@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97424-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97424 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>: https://gcc.gnu.org/g:5e00ad3ffbfb4df7242c313a0d836f5b538eb2fb commit r11-4930-g5e00ad3ffbfb4df7242c313a0d836f5b538eb2fb Author: David Malcolm <dmalcolm@redhat.com> Date: Wed Nov 11 21:16:45 2020 -0500 analyzer: warn on invalid shift counts [PR97424] This patch implements -Wanalyzer-shift-count-negative and -Wanalyzer-shift-count-overflow, analogous to the C/C++ warnings -Wshift-count-negative and -Wshift-count-overflow, but implemented via interprocedural path analysis rather than via parsing in a front end, and thus capable of detecting interprocedural cases that the warnings implemented in the front ends can miss. gcc/analyzer/ChangeLog: PR tree-optimization/97424 * analyzer.opt (Wanalyzer-shift-count-negative): New. (Wanalyzer-shift-count-overflow): New. * region-model.cc (class shift_count_negative_diagnostic): New. (class shift_count_overflow_diagnostic): New. (region_model::get_gassign_result): Complain about shift counts that are negative or are >= the operand's type's width. gcc/ChangeLog: PR tree-optimization/97424 * doc/invoke.texi (Static Analyzer Options): Add -Wno-analyzer-shift-count-negative and -Wno-analyzer-shift-count-overflow. (-Wno-analyzer-shift-count-negative): New. (-Wno-analyzer-shift-count-overflow): New. gcc/testsuite/ChangeLog: PR tree-optimization/97424 * gcc.dg/analyzer/invalid-shift-1.c: New test.
next prev parent reply other threads:[~2020-11-12 2:18 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-14 16:02 [Bug tree-optimization/97424] New: " fw at gcc dot gnu.org 2020-10-14 16:45 ` [Bug tree-optimization/97424] " jakub at gcc dot gnu.org 2020-10-14 16:48 ` fw at gcc dot gnu.org 2020-10-14 17:16 ` dmalcolm at gcc dot gnu.org 2020-10-15 6:00 ` rguenth at gcc dot gnu.org 2020-11-12 2:18 ` cvs-commit at gcc dot gnu.org [this message] 2020-11-12 14:03 ` dmalcolm at gcc dot gnu.org 2020-11-27 19:11 ` fw at gcc dot gnu.org 2020-12-26 16:41 ` vincent-gcc at vinc17 dot net
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-97424-4-tP4MuQCkgE@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).