summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-29 21:47:42 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-29 21:47:42 +0000
commitdbe1f550c75491888a9934fcd33fe7d5696beafe (patch)
treee872788a30b861d8ac3ce91e7c009008c9a9ce8c
parentbea25212a8390a451727ca1074636ecb49cf0dd1 (diff)
downloadppe42-gcc-dbe1f550c75491888a9934fcd33fe7d5696beafe.tar.gz
ppe42-gcc-dbe1f550c75491888a9934fcd33fe7d5696beafe.zip
* calls.c (expand_call): When modes of target and valreg match, force
sibcall failure when target is a MEM. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66260 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/calls.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2b65a5c7444..589009a8285 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-29 Olivier Hainque <hainque@act-europe.fr>
+
+ * calls.c (expand_call): When modes of target and valreg match, force
+ sibcall failure when target is a MEM.
+
2003-04-29 Geoffrey Keating <geoffk@apple.com>
* doc/invoke.texi (Overall Options): Mention -x objective-c-header.
diff --git a/gcc/calls.c b/gcc/calls.c
index bd889e1ae71..135f949028c 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -3279,6 +3279,12 @@ expand_call (exp, target, ignore)
If they refer to the same register, this move will be a no-op,
except when function inlining is being done. */
emit_move_insn (target, valreg);
+
+ /* If we are setting a MEM, this code must be executed. Since it is
+ emitted after the call insn, sibcall optimization cannot be
+ performed in that case. */
+ if (GET_CODE (target) == MEM)
+ sibcall_failure = 1;
}
else if (TYPE_MODE (TREE_TYPE (exp)) == BLKmode)
{
OpenPOWER on IntegriCloud