summaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-16 11:59:03 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-16 11:59:03 +0000
commit23f7e62bd6d142ec3f75062b5efbcc6f0505549f (patch)
treef52f5b59263e90bcf12f1bfd831bf0ede843f644 /gcc/calls.c
parent59b24b5b93cc3dcec84105d683da76f0400e4be7 (diff)
downloadgcc-23f7e62bd6d142ec3f75062b5efbcc6f0505549f.tar.gz
* calls.c (calls_function_1, expand_call): Only test
TYPE_RETURNS_STACK_DEPRESSED for FUNCTION_TYPE. * function.c (thread_prologue_and_epilogue_insns): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35743 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index cd4fed72825..2d0d52c40f6 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -281,8 +281,10 @@ calls_function_1 (exp, which)
case CALL_EXPR:
if (which == 0)
return 1;
- else if (TYPE_RETURNS_STACK_DEPRESSED
- (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0)))))
+ else if ((TREE_CODE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0))))
+ == FUNCTION_TYPE)
+ && (TYPE_RETURNS_STACK_DEPRESSED
+ (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0))))))
return 1;
else if (TREE_CODE (TREE_OPERAND (exp, 0)) == ADDR_EXPR
&& (TREE_CODE (TREE_OPERAND (TREE_OPERAND (exp, 0), 0))
@@ -2195,7 +2197,8 @@ expand_call (exp, target, ignore)
flags |= flags_from_decl_or_type (TREE_TYPE (TREE_TYPE (p)));
/* Mark if the function returns with the stack pointer depressed. */
- if (TYPE_RETURNS_STACK_DEPRESSED (TREE_TYPE (TREE_TYPE (p))))
+ if (TREE_CODE (TREE_TYPE (TREE_TYPE (p))) == FUNCTION_TYPE
+ && TYPE_RETURNS_STACK_DEPRESSED (TREE_TYPE (TREE_TYPE (p))))
{
flags |= ECF_SP_DEPRESSED;
flags &= ~ (ECF_PURE | ECF_CONST);