http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46985
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.12.17 12:05:09
CC| |jakub at gcc dot gnu.org,
| |spop at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-17
12:05:09 UTC ---
instantiate_scev_r is called on:
{&tar[ptr$dim$0$lbound_81 + -1].i, +, 4}_3
and the problem is with that COMPONENT_REF inside of it. COMPONENT_REF has 3
operands, but the last one is optional (there are lots of other trees like
that),
but instantiate_scev_r/instantiate_scev_[123] assume all operands must be
non-NULL.
So, one possible fix would be to:
if (automatically_generated_chrec_p (chrec)
+ || chrec == NULL
|| is_gimple_min_invariant (chrec))
return chrec;
at the beginning of instantiate_scev_r. Or maybe it is just wrong to call
instantiate_scev_r with such arguments and the bug is earlier.