summaryrefslogtreecommitdiff
path: root/gcc/integrate.c
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-06 09:06:13 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-06 09:06:13 +0000
commit99e4c1757c4c8c65f47f1e6e3ebc1dc9e52fe090 (patch)
treee37f7c301b8f45e7141c78fb72e53cdc1971b17a /gcc/integrate.c
parent77c13f26d3e662f30c1315b5a117eca1f8ca884a (diff)
downloadgcc-99e4c1757c4c8c65f47f1e6e3ebc1dc9e52fe090.tar.gz
* integrate.c (copy_rtx_and_substitute): When copying
an ignored return value, strip REG_FUNCTION_VALUE_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38747 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r--gcc/integrate.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c
index f6e43027580..9859a02c9eb 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -1844,9 +1844,18 @@ copy_rtx_and_substitute (orig, map, for_lhs)
the function doesn't have a return value, error. If the
mode doesn't agree, and it ain't BLKmode, make a SUBREG. */
if (map->inline_target == 0)
- /* Must be unrolling loops or replicating code if we
- reach here, so return the register unchanged. */
- return orig;
+ {
+ if (rtx_equal_function_value_matters)
+ /* This is an ignored return value. We must not
+ leave it in with REG_FUNCTION_VALUE_P set, since
+ that would confuse subsequent inlining of the
+ current function into a later function. */
+ return gen_rtx_REG (GET_MODE (orig), regno);
+ else
+ /* Must be unrolling loops or replicating code if we
+ reach here, so return the register unchanged. */
+ return orig;
+ }
else if (GET_MODE (map->inline_target) != BLKmode
&& mode != GET_MODE (map->inline_target))
return gen_lowpart (mode, map->inline_target);