diff options
author | alehotsky <alehotsky@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-11 23:01:40 +0000 |
---|---|---|
committer | alehotsky <alehotsky@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-11 23:01:40 +0000 |
commit | a1ad46003cbfb2933c2c28ddfc215d3e0d8dfc4d (patch) | |
tree | 46723b9d5b2b4b73dd839f7b5862b54e7ff25d37 /gcc/builtins.c | |
parent | b543d918e34d39bf08b1015499869b93de41607d (diff) | |
download | gcc-a1ad46003cbfb2933c2c28ddfc215d3e0d8dfc4d.tar.gz |
*** empty log message ***
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38929 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 1ad33f24826..b7db928d48c 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -2801,8 +2801,13 @@ std_expand_builtin_va_start (stdarg_p, valist, nextarg) if (! stdarg_p) { + /* The dummy named parameter is declared as a 'word' sized + object, but if a 'word' is smaller than an 'int', it would + have been promoted to int when it was added to the arglist. */ int align = PARM_BOUNDARY / BITS_PER_UNIT; - int offset = (((UNITS_PER_WORD + align - 1) / align) * align); + int size = MAX (UNITS_PER_WORD, + GET_MODE_SIZE (TYPE_MODE (integer_type_node))); + int offset = ((size + align - 1) / align) * align; nextarg = plus_constant (nextarg, -offset); } |