https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83580

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems create_data_ref creates something bogus, it really can't split off the
offset from the base.
dr_analyze_innermost calls:
897       split_constant_offset (offset_iv.base, &offset_iv.base, &dinit);
with offset_iv.base being originally
(sizetype) (signed char) (130 - (unsigned char) t_29) * 4
and makes (sizetype) (signed char) -(unsigned char) t_29 * 4 out of it with
dinit 520.
split_constant_offset uses STRIP_NOPS and split_constant_offset_1 has:
698             /* We must not introduce undefined overflow, and we must not
change the value.
699                Hence we're okay if the inner type doesn't overflow to start
with
700                (pointer or signed), the outer type also is an integer or
pointer
701                and the outer precision is at least as large as the inner. 
*/
702             tree itype = TREE_TYPE (op0);
703             if ((POINTER_TYPE_P (itype)
704                  || (INTEGRAL_TYPE_P (itype) && TYPE_OVERFLOW_UNDEFINED
(itype)))
705                 && TYPE_PRECISION (type) >= TYPE_PRECISION (itype)
706                 && (POINTER_TYPE_P (type) || INTEGRAL_TYPE_P (type)))
707               {
708                 split_constant_offset (op0, &var0, off);
709                 *var = fold_convert (type, var0);
710                 return true;
711               }
712             return false;

Richard, can you please have a look?

Reply via email to