public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-106072-35322-WhBIGg3jtt@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106072-35322@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106072

--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:95dc11475dac06b5eecd904079de8aa94827a36a

commit r13-4697-g95dc11475dac06b5eecd904079de8aa94827a36a
Author: Jakub Jelinek <jakub@redhat.com>
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
âRust::AST::ClosureParam
Rust::Parser<ManagedTokenSource>::parse_closure_param() [with
ManagedTokenSource = Rust::Lexer]â:
    .../gcc/rust/parse/rust-parse-impl.h:8916:49: error: âthisâ pointer is
null [-Werror=nonnull]
    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 invalid.

    2022-12-14  Jakub Jelinek  <jakub@redhat.com>

            PR rust/106072
            * parse/rust-parse-impl.h (parse_closure_param): Store
            pattern->get_locus () in a temporary before std::move (pattern) is
            invoked.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-12-14 10:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-106072-35322@http.gcc.gnu.org/bugzilla/>
2022-12-14  8:51 ` [Bug rust/106072] [13 Regression] Bogus " jakub at gcc dot gnu.org
2022-12-14  8:55 ` jakub at gcc dot gnu.org
2022-12-14 10:06 ` tschwinge at gcc dot gnu.org
2022-12-14 10:17 ` [Bug rust/106072] [13 Regression] " tschwinge at gcc dot gnu.org
2022-12-14 10:36 ` cvs-commit at gcc dot gnu.org [this message]
2022-12-20 14:05 ` rguenth at gcc dot gnu.org
2022-12-20 14:06 ` ktkachov at gcc dot gnu.org
2022-12-20 14:08 ` ro at CeBiTec dot Uni-Bielefeld.DE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-106072-35322-WhBIGg3jtt@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-rust@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).