From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE895394C00A; Mon, 31 Jan 2022 16:50:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE895394C00A From: "dmalcolm at gcc dot 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, 31 Jan 2022 16:50:42 +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: Mon, 31 Jan 2022 16:50:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104308 --- Comment #4 from David Malcolm --- Yes; using -fdump-ipa-analyzer=3Dstderr shows that the memmove becomes: _1 =3D &s + 1; _3 =3D MEM [(char * {ref-all})_1]; MEM [(char * {ref-all})&s] =3D _3; where the first and third stmts in the gimple-ssa IR above have this locati= on: foo.c:2:25: note:=20 2 | int main() { char s[5]; memmove(s, s + 1, 2); } | ^~~~~~~~~~~~~~~~~~~~ but the middle stmt ("_3 =3D ...") has unknown location.=