From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6D6B63836D3A; Wed, 14 Dec 2022 10:36:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D6B63836D3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671014202; bh=BSOYTKBKPDny6SxoT0iX1Ag1QfEwN3oNYEW6D+mFdDQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SPC83QCD0NMenP/YucrsTz5bJGcUMj0/F40tEMocqx54BiEKFfOpsahjUiMYfaUuH MVLrVk1gPMINEqyU63JKG0ZHjoh6aQDaqXC0Q7PquRTh35y8sluosrW60fXymgtyxK GVf3PXcTl/xDM2qslhpzR+1sq4mz0DPDioAk3QPs= From: "cvs-commit at gcc dot gnu.org" To: gcc-rust@gcc.gnu.org Subject: [Bug rust/106072] [13 Regression] -Wnonnull warning breaks rust bootstrap Date: Wed, 14 Dec 2022 10:36:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rust X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 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 --- Comment #16 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:95dc11475dac06b5eecd904079de8aa94827a36a commit r13-4697-g95dc11475dac06b5eecd904079de8aa94827a36a Author: Jakub Jelinek Date: Wed Dec 14 11:35:22 2022 +0100 rust: Fix up aarch64-linux bootstrap [PR106072] Bootstrap fails on aarch64-linux and some other arches with: .../gcc/rust/parse/rust-parse-impl.h: In member function =C3=A2Rust::AST::ClosureParam Rust::Parser::parse_closure_param() [with ManagedTokenSource =3D Rust::Lexer]=C3=A2: .../gcc/rust/parse/rust-parse-impl.h:8916:49: error: =C3=A2this=C3=A2 p= ointer is null [-Werror=3Dnonnull] The problem is that while say on x86_64-linux the side-effects in the arguments are evaluated from last argument to first, on aarch64-linux it is the other way around, from first to last. The C++ I believe even in C++17 makes the evaluation of those side-effects unordered (indeterminately sequenced with no interleaving), so that is fine. But, when the call in return statement is evaluated from first to last, std::move (pattern) happens before pattern->get_locus () and the former will make pattern (std::unique_ptr) a wrapper object around nullptr, so dereferencing it later to call get_locus () on it is invali= d. 2022-12-14 Jakub Jelinek PR rust/106072 * parse/rust-parse-impl.h (parse_closure_param): Store pattern->get_locus () in a temporary before std::move (pattern)= is invoked. --=20 You are receiving this mail because: You are on the CC list for the bug.=