diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-01-02 21:43:51 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-01-02 21:43:51 +0000 |
commit | 9c2089be02c3363fdba5a5cf49668f1bce81e363 (patch) | |
tree | e4ac94aaba913d87aeee54b5e4774e39c8836370 /gcc/calls.c | |
parent | c92609b32ebc03931e8a84fd4569769cebb212de (diff) | |
download | ppe42-gcc-9c2089be02c3363fdba5a5cf49668f1bce81e363.tar.gz ppe42-gcc-9c2089be02c3363fdba5a5cf49668f1bce81e363.zip |
(expand_call): Don't use int_size_in_bytes for a variable-size object.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3060 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index c23fb829cd9..c132a6586b8 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -886,10 +886,10 @@ expand_call (exp, target, ignore) { /* We make a copy of the object and pass the address to the function being called. */ - int size = int_size_in_bytes (type); rtx copy; - if (size < 0) + if (TYPE_SIZE (type) == 0 + || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST) { /* This is a variable-sized object. Make space on the stack for it. */ @@ -908,7 +908,10 @@ expand_call (exp, target, ignore) TYPE_ALIGN (type))); } else - copy = assign_stack_temp (TYPE_MODE (type), size, 1); + { + int size = int_size_in_bytes (type); + copy = assign_stack_temp (TYPE_MODE (type), size, 1); + } store_expr (args[i].tree_value, copy, 0); |