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: 1561117 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=f82EuY8R; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J2jk02DQ0z9sS8 for ; Mon, 29 Nov 2021 22:27:04 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F17273835C2B for ; Mon, 29 Nov 2021 11:27:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F17273835C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1638185222; 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=f82EuY8RYUwzmhaU7Uwkz0ZqeDoKNdOraF+179gEk50S/k4EBzJcV5YjaqUjlXk2w 6NLj3K9AeThFy61dTDxRK6JJ2V8vRIcqrYZhyBrgCtla0b4iIILRnqzOHQI4JiLYH2 LbCYJTvc/7slftsl3pQkUWecrzrjw4L7hMiAwa/Y= 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+incoming=patchwork.ozlabs.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);