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 analyzer/104308] no location info provided for [-Wanalyzer-use-of-uninitialized-value] warnings Date: Mon, 25 Apr 2022 23:36:17 +0000 [thread overview] Message-ID: <bug-104308-4-3NW6ZRIREh@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104308-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104308 --- Comment #11 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:a5dc2641add6b4f54086d40ae706fda3cdaac7f5 commit r12-8253-ga5dc2641add6b4f54086d40ae706fda3cdaac7f5 Author: David Malcolm <dmalcolm@redhat.com> Date: Mon Apr 25 19:34:33 2022 -0400 gimple-fold: fix further missing stmt locations [PR104308] PR analyzer/104308 initially reported about a -Wanalyzer-use-of-uninitialized-value diagnostic using UNKNOWN_LOCATION when complaining about certain memmove operations where the source is uninitialized. In r12-7856-g875342766d4298 I fixed the missing location for a stmt generated by gimple_fold_builtin_memory_op, but the reporter then found another way to generate such a stmt with UNKNOWN_LOCATION. I've now gone through gimple_fold_builtin_memory_op looking at all statement creation, and found three places in which a new statement doesn't have a location set on it (either directly via gimple_set_location, or indirectly via gsi_replace), one of which is the new reproducer. This patch adds a gimple_set_location to these three cases, and adds test coverage for one of them (the third hunk within the patch), fixing the new reproducer for PR analyzer/104308. gcc/ChangeLog: PR analyzer/104308 * gimple-fold.cc (gimple_fold_builtin_memory_op): Explicitly set the location of new_stmt in all places that don't already set it, whether explicitly, or via a call to gsi_replace. gcc/testsuite/ChangeLog: PR analyzer/104308 * gcc.dg/analyzer/pr104308.c: Add test coverage. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
next prev parent reply other threads:[~2022-04-25 23:36 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-31 15:09 [Bug analyzer/104308] New: " kdudka at redhat dot com 2022-01-31 15:56 ` [Bug analyzer/104308] " dmalcolm at gcc dot gnu.org 2022-01-31 15:57 ` dmalcolm at gcc dot gnu.org 2022-01-31 16:40 ` kdudka at redhat dot com 2022-01-31 16:50 ` dmalcolm at gcc dot gnu.org 2022-03-25 21:52 ` dmalcolm at gcc dot gnu.org 2022-03-25 21:52 ` dmalcolm at gcc dot gnu.org 2022-03-28 13:44 ` cvs-commit at gcc dot gnu.org 2022-03-28 13:52 ` dmalcolm at gcc dot gnu.org 2022-04-13 7:51 ` kdudka at redhat dot com 2022-04-13 22:05 ` dmalcolm at gcc dot gnu.org 2022-04-14 13:27 ` dmalcolm at gcc dot gnu.org 2022-04-25 23:36 ` cvs-commit at gcc dot gnu.org [this message] 2022-04-25 23:39 ` dmalcolm 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-104308-4-3NW6ZRIREh@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).