From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id C3CFE3857C4D; Mon, 18 Jul 2022 07:05:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3CFE3857C4D Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Merge #1391 X-Act-Checkin: gcc X-Git-Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> X-Git-Refname: refs/heads/devel/rust/master X-Git-Oldrev: fd2bd659e44e5b7fea92bc34a4864f057f387490 X-Git-Newrev: e4cdb24c468b8a848980f7138767fbe093471c5b Message-Id: <20220718070526.C3CFE3857C4D@sourceware.org> Date: Mon, 18 Jul 2022 07:05:26 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2022 07:05:26 -0000 https://gcc.gnu.org/g:e4cdb24c468b8a848980f7138767fbe093471c5b commit e4cdb24c468b8a848980f7138767fbe093471c5b Merge: fd2bd659e44 9c7a580aa13 Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Sun Jul 17 19:52:16 2022 +0000 Merge #1391 1391: Fix ICE on duplicate compilation of ExternBlock items r=philberty a=philberty When we declare an extern block after where it is used the query compilation system in the backend code-gen pass will resolve this and compile as required. But when the iteration of the crate as part of the pipeline we end up compiling this function again. The check we used to stop this was copy paste from the other function items but in this case the check for function_completed is not valid as this is a prototype for an extern item so we dont add this to the translation unit as an fndecl which meant we hit the ICE where we compile and add it again. Fixes #1323 Co-authored-by: Philip Herron Diff: gcc/rust/backend/rust-compile-extern.h | 20 ++++++++++++-------- gcc/testsuite/rust/compile/issue-1323-1.rs | 18 ++++++++++++++++++ gcc/testsuite/rust/compile/issue-1323-2.rs | 16 ++++++++++++++++ 3 files changed, 46 insertions(+), 8 deletions(-)