From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id 78157385841C; Mon, 29 Nov 2021 15:19:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78157385841C MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-5579] Fix RTL FE issue with premature return X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: 1420ff3efcff98df0e8c6f021a7ff24b5fc65043 X-Git-Newrev: e2194a8b39251497d770abf3fb6ee06de6072ed9 Message-Id: <20211129151914.78157385841C@sourceware.org> Date: Mon, 29 Nov 2021 15:19:14 +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, 29 Nov 2021 15:19:14 -0000 https://gcc.gnu.org/g:e2194a8b39251497d770abf3fb6ee06de6072ed9 commit r12-5579-ge2194a8b39251497d770abf3fb6ee06de6072ed9 Author: Richard Biener Date: Mon Nov 29 12:24:30 2021 +0100 Fix RTL FE issue with premature return This fixes an issue discovered by -Wunreachable-code-return 2021-11-29 Richard Biener * read-rtl-function.c (function_reader::read_rtx_operand): Return only after resetting m_in_call_function_usage. Diff: --- 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);