On 07/20/2017 10:46 AM, Richard Biener wrote:
On Wed, Jul 19, 2017 at 5:42 PM, Tom de Vries <tom_devr...@mentor.com> wrote:
Hi,
this patch makes an assert in gimple_phi_arg more strict.
The current assert allows 'index == phi_stmt->capacity', but
'phi_stmt->args[phi_stmt->capacity]' is out of bounds.
Bootstrapped and reg-tested on x86_64.
Committed as obvious.
Hmm, shouldn't it be index < phi_stmt->nargs?
It should, but it's not as simple as just updating the assert: I've just
submitted a patch for that:
https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01204.html .
See gimple_phi_set_arg
which also has a similar bug checking index <= phi->nargs.
I've already fixed that here (
https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01177.html ).
Thanks,
- Tom