From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 398D63858406; Tue, 8 Nov 2022 01:15:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 398D63858406 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667870143; bh=nLCw4QfMoQD7U3YsrgVDv7ZZBUXQsfLwd0/OyPL6x7Y=; h=From:To:Subject:Date:From; b=qPtNvY+vBKRaSaYOUmPegnfNYcwHfJuBqiAkOLTLFZoCEk8JL/2CiriOL27HyZ+tY XdSgh0l++i1x4wxVVRAVttvwB1aaI1zOvQxyqvlB3swdZUcJMyW5LrogDuXymQGs0w Lilbya07h/tja4u6Tm+Tjn/5cMMvPKkSgCsxrEEU= From: "eggert at cs dot ucla.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/107565] New: -Wanalyzer-use-of-uninitialized-value false positive with rdrand Date: Tue, 08 Nov 2022 01:15:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eggert at cs dot ucla.edu X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107565 Bug ID: 107565 Summary: -Wanalyzer-use-of-uninitialized-value false positive with rdrand Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: eggert at cs dot ucla.edu Target Milestone: --- Created attachment 53846 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53846&action=3Dedit test program illustrating the -fanalyzer false positive This is gcc (GCC) 12.2.1 20220819 (Red Hat 12.2.1-2) on x86-64. Compile the attached program with the command: gcc -O2 -mrdrnd -fanalyzer -S t.c GCC says "warning: use of uninitialized value =E2=80=98x=E2=80=99 [CWE-457] [-Wanalyzer-use-of-uninitialized-value]". This is a false positive, as x ca= nnot possibly be uninitialized. Apparently -fanalyzer is confused about how __builtin_ia32_rdrand64_step works. GCC 11.3.0 does not issue this diagnostic, so this is a regression.=