From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E8B943858C20; Thu, 10 Feb 2022 23:59:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8B943858C20 From: "dmalcolm 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: Thu, 10 Feb 2022 23:59:35 +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: dmalcolm 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: Thu, 10 Feb 2022 23:59:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104274 --- Comment #4 from David Malcolm --- This patch seems to fix it, but I'm not yet sure if it's the correct fix. diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc index f8f19769258..9b42e9e983d 100644 --- a/gcc/analyzer/region-model.cc +++ b/gcc/analyzer/region-model.cc @@ -843,6 +843,10 @@ region_model::check_for_poison (const svalue *sval, if (const poisoned_svalue *poisoned_sval =3D sval->dyn_cast_poisoned_sva= lue ()) { + /* Ignore empty types. */ + if (sval->get_type () && is_empty_type (sval->get_type ())) + return sval; + /* If we have an SSA name for a temporary, we don't want to print ''. Poisoned values are shared by type, and so we can't reconstruct=