Commit 0267afc4 by Ian Lance Taylor Committed by Ian Lance Taylor

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
parent 2ba9daa7
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> 2009-04-21 Andreas Schwab <schwab@linux-m68k.org>
* config/m68k/linux.h (FINALIZE_TRAMPOLINE): Use enum for second * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Use enum for second
......
...@@ -3241,7 +3241,7 @@ altivec_resolve_overloaded_builtin (tree fndecl, void *passed_arglist) ...@@ -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 /* If the number of arguments did not match the prototype, return NULL
and the generic code will issue the appropriate error message. */ 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; return NULL;
if (n == 0) if (n == 0)
......
...@@ -132,7 +132,7 @@ spu_resolve_overloaded_builtin (tree fndecl, void *passed_args) ...@@ -132,7 +132,7 @@ spu_resolve_overloaded_builtin (tree fndecl, void *passed_args)
{ {
tree var, arg_type, param_type = TREE_VALUE (param); tree var, arg_type, param_type = TREE_VALUE (param);
if (p < nargs) if (p >= nargs)
{ {
error ("insufficient arguments to overloaded function %s", error ("insufficient arguments to overloaded function %s",
desc->name); desc->name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment