This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [GOOGLE] More strict checking for call args
- From: Dehao Chen <dehao at google dot com>
- To: Xinliang David Li <davidxl at google dot com>
- Cc: Duncan Sands <baldrick at free dot fr>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 3 Jun 2013 17:55:00 -0700
- Subject: Re: [GOOGLE] More strict checking for call args
- References: <CAO2gOZWs7maFPDo=EZUe1mPARfNFxxnA5Yg3z0Wo0WS1+2ji2Q at mail dot gmail dot com> <51A85C16 dot 1030505 at free dot fr> <CAAkRFZL7aPp9WSxsj1yaujdBWrs91D=H0d_+KxVcgnh=xnt7Ng at mail dot gmail dot com>
Hi,
This patch was committed to google branch. But I think it is of
general interest. So is it ok for trunk?
Thanks,
Dehao
gcc/ChangeLog:
2013-06-03 Dehao Chen <dehao@google.com>
*gimple-low.c (gimple_check_call_args): Restrict the call_arg check to
contain same number of args.
Index: gcc/gimple-low.c
===================================================================
--- gcc/gimple-low.c (revision 199570)
+++ gcc/gimple-low.c (working copy)
@@ -243,6 +243,8 @@ 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)
{