From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 413573858C33; Tue, 8 Nov 2022 05:39:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 413573858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667885989; bh=aSrBR9PCqjx0mbLUWKEdhKWUHfVZPvKG+eATNeLqhSA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cz1pKfods9Ooti22arKzVmj9YZdXYd3OuPXvoshObilUEOgvZjyrZ2H5kvHYvQzGR /X5uAinP3vMsNNys42bVgPvwvFtuqUu3P7uVcgLmmjf9JIpywpL6PEIRWJClVpqSjv b7TSJY3ppP4hkmOu0WhUgWNBwxo3g/2F7P78AvCc= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107565] -Wanalyzer-use-of-uninitialized-value false positive with rdrand Date: Tue, 08 Nov 2022 05:39:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords bug_status cf_gcctarget cf_reconfirmed_on component assigned_to everconfirmed 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107565 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Target| |x86_64 Last reconfirmed| |2022-11-08 Component|analyzer |target Assignee|dmalcolm at gcc dot gnu.org |unassigned at gcc d= ot gnu.org Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- Confirmed. else if (!fndecl_has_gimple_body_p (callee_fndecl) && (!(callee_fndecl_flags & (ECF_CONST | ECF_PURE))) && !fndecl_built_in_p (callee_fndecl)) unknown_side_effects =3D true; The last part is part of the problem I think. At least here. Yes maybe we should have another builtin which returns a "_Complex unsigned long long" here which is folded into for __builtin_ia32_rdrand*_step to rem= ove the need to the address too. I am going to declare this one as a target issue but there might be other builtins which are harder to do the "_Complex" trick.=