From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 10E283858D1E; Fri, 11 Feb 2022 13:47:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10E283858D1E From: "cvs-commit at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2022 13:47:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104274 --- Comment #5 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:cc68ad87014a331399ccb2528db3bf47fabe6f72 commit r12-7199-gcc68ad87014a331399ccb2528db3bf47fabe6f72 Author: David Malcolm 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 =3D 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 =