public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5579] Fix RTL FE issue with premature return
@ 2021-11-29 15:19 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-11-29 15:19 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e2194a8b39251497d770abf3fb6ee06de6072ed9

commit r12-5579-ge2194a8b39251497d770abf3fb6ee06de6072ed9
Author: Richard Biener <rguenther@suse.de>
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  <rguenther@suse.de>
    
            * 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-29 15:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 15:19 [gcc r12-5579] Fix RTL FE issue with premature return Richard Biener

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).