From a6e07e27e77d5e5031f62f515f48c6c3232bd3fa Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 19 Jul 2017 15:33:40 +0000 Subject: [PATCH] Fix assert in gimple_phi_arg 2017-07-19 Tom de Vries * gimple.h (gimple_phi_arg): Make assert more strict. From-SVN: r250351 --- gcc/ChangeLog | 4 ++++ gcc/gimple.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b27b9aa74b7..152719cc60d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-07-19 Tom de Vries + + * gimple.h (gimple_phi_arg): Make assert more strict. + 2017-07-19 Steven Munroe * config.gcc (powerpc*-*-*): Add mmintrin.h. diff --git a/gcc/gimple.h b/gcc/gimple.h index 575babe11ef..e19cc1c6bb3 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -4341,7 +4341,7 @@ static inline struct phi_arg_d * gimple_phi_arg (gimple *gs, unsigned index) { gphi *phi_stmt = as_a (gs); - gcc_gimple_checking_assert (index <= phi_stmt->capacity); + gcc_gimple_checking_assert (index < phi_stmt->capacity); return &(phi_stmt->args[index]); } -- 2.30.2