From 8f860bca0072af4f012e6640f1befa9bb02f4ed5 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 19 Jul 2017 15:33:50 +0000 Subject: Fix assert in gimple_phi_set_arg 2017-07-19 Tom de Vries * gimple.h (gimple_phi_set_arg): Make assert more strict. From-SVN: r250352 --- gcc/ChangeLog | 4 ++++ gcc/gimple.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 152719c..426577b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2017-07-19 Tom de Vries + * gimple.h (gimple_phi_set_arg): Make assert more strict. + +2017-07-19 Tom de Vries + * gimple.h (gimple_phi_arg): Make assert more strict. 2017-07-19 Steven Munroe diff --git a/gcc/gimple.h b/gcc/gimple.h index e19cc1c..aba7167 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -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; } -- cgit v1.1