aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-11-29 12:24:30 +0100
committerRichard Biener <rguenther@suse.de>2021-11-29 16:18:45 +0100
commite2194a8b39251497d770abf3fb6ee06de6072ed9 (patch)
treef69fded2996b19d60b62d4e5bdc4e48de5a27dfa /gcc
parent1420ff3efcff98df0e8c6f021a7ff24b5fc65043 (diff)
downloadgcc-e2194a8b39251497d770abf3fb6ee06de6072ed9.zip
gcc-e2194a8b39251497d770abf3fb6ee06de6072ed9.tar.gz
gcc-e2194a8b39251497d770abf3fb6ee06de6072ed9.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/read-rtl-function.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/read-rtl-function.c b/gcc/read-rtl-function.c
index 5699f57..81d7531 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);