From 8f860bca0072af4f012e6640f1befa9bb02f4ed5 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 19 Jul 2017 15:33:50 +0000 Subject: [PATCH] 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(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 152719cc60d..426577b942b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +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. diff --git a/gcc/gimple.h b/gcc/gimple.h index e19cc1c6bb3..aba7167f381 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; }