diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-04-18 22:40:55 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-04-18 22:40:55 +0000 |
commit | 5970b26a3f1698c532aa0f6762e2dc631265d788 (patch) | |
tree | 3ada06b71f74d28c4b19f8e61e832763a0163505 /gcc/function.c | |
parent | fc7848ac5712b5d999446be03ba3a3d3c332272d (diff) | |
download | gcc-5970b26a3f1698c532aa0f6762e2dc631265d788.tar.gz |
(instantiate_decls): For DECL_INCOMING_RTL, use max
of type size and mode size in instantiate_decl call.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13933 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/function.c b/gcc/function.c index e9e99fe10e0..7560866df19 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2622,10 +2622,14 @@ instantiate_decls (fndecl, valid_only) /* Process all parameters of the function. */ for (decl = DECL_ARGUMENTS (fndecl); decl; decl = TREE_CHAIN (decl)) { - instantiate_decl (DECL_RTL (decl), int_size_in_bytes (TREE_TYPE (decl)), - valid_only); - instantiate_decl (DECL_INCOMING_RTL (decl), - int_size_in_bytes (TREE_TYPE (decl)), valid_only); + int size = int_size_in_bytes (TREE_TYPE (decl)); + instantiate_decl (DECL_RTL (decl), size, valid_only); + + /* If the parameter was promoted, then the incoming RTL mode may be + larger than the declared type size. We must use the larger of + the two sizes. */ + size = MAX (GET_MODE_SIZE (GET_MODE (DECL_INCOMING_RTL (decl))), size); + instantiate_decl (DECL_INCOMING_RTL (decl), size, valid_only); } /* Now process all variables defined in the function or its subblocks. */ |