From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 86BF53833EBE; Wed, 14 Dec 2022 08:51:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86BF53833EBE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671007892; bh=hDKLHEoXE7zXZmNZ/880E4rQvhQd6L6S1ilIq32sv/I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=D3g1ejNNIBM18COE3pOLZ4NhEnsnI6v+QsdNRA89pqfkHOWDhvIVOPXzcNbM6bLuZ W0HeWS5o8iefn0PDakriXg0ScldlpCXX8WN30W95pNDeuLz7VYQuE8ZqGkAXWtkPFw /CW3SEg1tyAS7LkG5KkJeFBCNGnKNF467RwVDVxU= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/106072] [13 Regression] Bogus -Wnonnull warning breaks rust bootstrap Date: Wed, 14 Dec 2022 08:51:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: build, diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc bug_status assigned_to 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=3D106072 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gn= u.org --- Comment #13 from Jakub Jelinek --- No, that is not the problem. The problem is solely in the: return AST::ClosureParam (std::move (pattern), pattern->get_locus (), std::move (type), std::move (outer_attrs)); line. pattern is a unique_ptr, std::move (pattern) will: _GLIBCXX23_CONSTEXPR __uniq_ptr_impl(__uniq_ptr_impl&& __u) noexcept : _M_t(std::move(__u._M_t)) { __u._M_ptr() =3D nullptr; } and so once std::move (pattern) is done, pattern is nullptr. And then it c= alls pattern->get_locus (), already on the nullptr.=