https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83573
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-12-25
CC| |amker at gcc dot gnu.org,
| |amonakov at gcc dot gnu.org
Summary|Wrong constant folding |[8 Regression] invalid
| |access introduced in
| |predcom
Ever confirmed|0 |1
--- Comment #2 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
I think the actual culprit is predcom rather than ch_vect; predcom introduces:
<bb 9> [local count: 136902083]:
_26 = (unsigned char) t_29;
_25 = -_26;
_34 = (signed char) _25;
_33 = (sizetype) _34;
_53 = _33 * 4;
_54 = &a + _53;
a_I_lsm0.9_55 = MEM[(int *)_54 + 520B];
where t_29 corresponds to value 129 at runtime; assignment to _34 assigns 127
and then the assignment to a_I_lsm0.9_55 performs an OOB access.