diff options
author | Ian Lance Taylor <iant@google.com> | 2009-04-21 13:59:28 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2009-04-21 13:59:28 +0000 |
commit | 0267afc48d8f1e520d850241b73d4d68a56278cf (patch) | |
tree | 1fa42a027e0d03ab100b6848c0741b66eccee257 /gcc | |
parent | 2ba9daa701f829cd991006a9aa29b74b88831bc9 (diff) | |
download | gcc-0267afc48d8f1e520d850241b73d4d68a56278cf.zip gcc-0267afc48d8f1e520d850241b73d4d68a56278cf.tar.gz gcc-0267afc48d8f1e520d850241b73d4d68a56278cf.tar.bz2 |
rs6000-c.c (altivec_resolve_overloaded_builtin): Correct test for number of arguments.
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
Correct test for number of arguments.
* config/spu/spu-c.c (spu_resolve_overloaded_builtin): Likewise.
From-SVN: r146526
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000-c.c | 2 | ||||
-rw-r--r-- | gcc/config/spu/spu-c.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 19db0d1..dc53ed3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-04-21 Ian Lance Taylor <iant@google.com> + + * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): + Correct test for number of arguments. + * config/spu/spu-c.c (spu_resolve_overloaded_builtin): Likewise. + 2009-04-21 Andreas Schwab <schwab@linux-m68k.org> * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Use enum for second diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index ebcb111..89e01c2 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -3241,7 +3241,7 @@ altivec_resolve_overloaded_builtin (tree fndecl, void *passed_arglist) /* If the number of arguments did not match the prototype, return NULL and the generic code will issue the appropriate error message. */ - if (!VOID_TYPE_P (TREE_VALUE (fnargs)) || nargs > 0) + if (!VOID_TYPE_P (TREE_VALUE (fnargs)) || n < nargs) return NULL; if (n == 0) diff --git a/gcc/config/spu/spu-c.c b/gcc/config/spu/spu-c.c index 2ae57ba..6ab7f3b 100644 --- a/gcc/config/spu/spu-c.c +++ b/gcc/config/spu/spu-c.c @@ -132,7 +132,7 @@ spu_resolve_overloaded_builtin (tree fndecl, void *passed_args) { tree var, arg_type, param_type = TREE_VALUE (param); - if (p < nargs) + if (p >= nargs) { error ("insufficient arguments to overloaded function %s", desc->name); |