From patchwork Mon Nov 29 11:26:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 48247 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 35B323835C0A for ; Mon, 29 Nov 2021 11:26:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 35B323835C0A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1638185210; bh=XAa8fZfm4+Ct1b6PAL/L92oPpHd5LBXPJYmGMltz860=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=G+sNW8Ff4ThvNGo2G5SMrRnY4bBpM7w1mxRRRVKrQRTG3fYLuiMp/mvyxDGi0hbUh O8L7g7N0SzozwpmtxdRfo2Zvfaws8lKJBVQMonmOs9xUkIIVJJI4NtGAMZY2Hy1oXb kkP73R3dXAkK6VhTI0r4BzVfEwpsU6ZTMe6WwEZ8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 826B93858417 for ; Mon, 29 Nov 2021 11:26:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 826B93858417 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 59C731FCA1; Mon, 29 Nov 2021 11:26:19 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3CD1413B53; Mon, 29 Nov 2021 11:26:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id MqVYDdu4pGHbEQAAMHmgww (envelope-from ); Mon, 29 Nov 2021 11:26:19 +0000 Date: Mon, 29 Nov 2021 12:26:18 +0100 (CET) To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix RTL FE issue with premature return Message-ID: <607o2so7-3482-122r-n2q1-s1r9n791s724@fhfr.qr> MIME-Version: 1.0 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" This fixes an issue discovered by -Wunreachable-code-return Bootstrap / regtest pending on x86_64-unknown-linux-gnu, OK? 2021-11-29 Richard Biener * read-rtl-function.c (function_reader::read_rtx_operand): Return only after resetting m_in_call_function_usage. --- gcc/read-rtl-function.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/read-rtl-function.c b/gcc/read-rtl-function.c index 5699f574a37..81d7531ce47 100644 --- a/gcc/read-rtl-function.c +++ b/gcc/read-rtl-function.c @@ -886,8 +886,9 @@ function_reader::read_rtx_operand (rtx x, int idx) if (idx == 7 && CALL_P (x)) { m_in_call_function_usage = true; - return rtx_reader::read_rtx_operand (x, idx); + rtx tem = rtx_reader::read_rtx_operand (x, idx); m_in_call_function_usage = false; + return tem; } else return rtx_reader::read_rtx_operand (x, idx);