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/104274] FAIL: gcc.dg/analyzer/pr97029.c (test for excess errors) Date: Fri, 11 Feb 2022 13:47:08 +0000 [thread overview] Message-ID: <bug-104274-4-znMfNniucW@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104274-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104274 --- Comment #5 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:cc68ad87014a331399ccb2528db3bf47fabe6f72 commit r12-7199-gcc68ad87014a331399ccb2528db3bf47fabe6f72 Author: David Malcolm <dmalcolm@redhat.com> Date: Thu Feb 10 19:01:30 2022 -0500 analyzer: ignore uninitialized uses of empty types [PR104274] PR analyzer/104274 reports a false positive from -Wanalyzer-use-of-uninitialized-value on hppa when passing an empty struct as a function parameter. pa_pass_by_reference returns true for empty structs, so the call is turned into: struct empty arg.0; arg.0 = arg called_function (arg.0); by gimplify_parameters. However, gimplify_modify_expr discards assignments statments of empty types, so that we end up with: struct empty arg.0; called_function (arg.0); which the analyzer considers to be a use of uninitialized "arg.0"; Given that gimplify_modify_expr will discard any assignments to such types, it seems simplest for -Wanalyzer-use-of-uninitialized-value to ignore values of empty types. gcc/analyzer/ChangeLog: PR analyzer/104274 * region-model.cc (region_model::check_for_poison): Ignore uninitialized uses of empty types. gcc/testsuite/ChangeLog: PR analyzer/104274 * gcc.dg/analyzer/torture/empty-struct-1.c: New test. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
next prev parent reply other threads:[~2022-02-11 13:47 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-28 18:57 [Bug analyzer/104274] New: " danglin at gcc dot gnu.org 2022-02-10 23:02 ` [Bug analyzer/104274] " dmalcolm at gcc dot gnu.org 2022-02-10 23:38 ` dmalcolm at gcc dot gnu.org 2022-02-10 23:50 ` dmalcolm at gcc dot gnu.org 2022-02-10 23:59 ` dmalcolm at gcc dot gnu.org 2022-02-11 13:47 ` cvs-commit at gcc dot gnu.org [this message] 2022-02-11 13:53 ` 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-104274-4-znMfNniucW@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).