This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GOOGLE] More strict checking for call args


This patch makes more strict check of call args to make sure the
number of args match.

Bootstrapped and passed regression tests.

OK for google branches?

Thanks,
Dehao

Index: gcc/gimple-low.c
===================================================================
--- gcc/gimple-low.c (revision 199414)
+++ gcc/gimple-low.c (working copy)
@@ -254,9 +254,13 @@ gimple_check_call_args (gimple stmt, tree fndecl)
   && !fold_convertible_p (DECL_ARG_TYPE (p), arg)))
             return false;
  }
+      if (p != NULL)
+ return false;
     }
   else if (parms)
     {
+      if (list_length (parms) - nargs != 1)
+ return false;
       for (i = 0, p = parms; i < nargs; i++, p = TREE_CHAIN (p))
  {
   tree arg;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]