Fix assert in gimple_phi_set_arg

2017-07-19  Tom de Vries  <tom@codesourcery.com>

	* gimple.h (gimple_phi_set_arg): Make assert more strict.

From-SVN: r250352
This commit is contained in:
Tom de Vries 2017-07-19 15:33:50 +00:00 committed by Tom de Vries
parent a6e07e27e7
commit 8f860bca00
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2017-07-19 Tom de Vries <tom@codesourcery.com>
* gimple.h (gimple_phi_set_arg): Make assert more strict.
2017-07-19 Tom de Vries <tom@codesourcery.com>
* gimple.h (gimple_phi_arg): Make assert more strict.

View File

@ -4351,7 +4351,7 @@ gimple_phi_arg (gimple *gs, unsigned index)
static inline void
gimple_phi_set_arg (gphi *phi, unsigned index, struct phi_arg_d * phiarg)
{
gcc_gimple_checking_assert (index <= phi->nargs);
gcc_gimple_checking_assert (index < phi->nargs);
phi->args[index] = *phiarg;
}