diff options
author | Alan Lehotsky <lehotsky@tiac.net> | 2001-01-11 23:01:40 +0000 |
---|---|---|
committer | Alan Lehotsky <alehotsky@gcc.gnu.org> | 2001-01-11 18:01:40 -0500 |
commit | bbc7fda9b0e4596d55e7ae9bc73d918004f6e4f1 (patch) | |
tree | 46723b9d5b2b4b73dd839f7b5862b54e7ff25d37 /gcc/builtins.c | |
parent | a4299d07de85eb2919c86f84a9226fd6143fcbe1 (diff) | |
download | gcc-bbc7fda9b0e4596d55e7ae9bc73d918004f6e4f1.zip gcc-bbc7fda9b0e4596d55e7ae9bc73d918004f6e4f1.tar.gz gcc-bbc7fda9b0e4596d55e7ae9bc73d918004f6e4f1.tar.bz2 |
*** empty log message ***
From-SVN: r38929
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 1ad33f2..b7db928 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); } |