diff options
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/function.c b/gcc/function.c index 6bdb500..ef98091 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2020,9 +2020,14 @@ aggregate_value_p (const_tree exp, const_tree fntype) case CALL_EXPR: { tree fndecl = get_callee_fndecl (fntype); - fntype = (fndecl - ? TREE_TYPE (fndecl) - : TREE_TYPE (TREE_TYPE (CALL_EXPR_FN (fntype)))); + if (fndecl) + fntype = TREE_TYPE (fndecl); + else if (CALL_EXPR_FN (fntype)) + fntype = TREE_TYPE (TREE_TYPE (CALL_EXPR_FN (fntype))); + else + /* For internal functions, assume nothing needs to be + returned in memory. */ + return 0; } break; case FUNCTION_DECL: |