]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix RTL FE issue with premature return
authorRichard Biener <rguenther@suse.de>
Mon, 29 Nov 2021 11:24:30 +0000 (12:24 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 29 Nov 2021 15:18:45 +0000 (16:18 +0100)
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.

gcc/read-rtl-function.c

index 5699f574a376139891f7b429ed67d558b1593e0b..81d7531ce472fd952ac0c53df5df6ae2d75405b0 100644 (file)
@@ -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);