https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31178
--- Comment #20 from Andrew Macleod <amacleod at redhat dot com> ---
That is correct.
tree op1_type = TREE_TYPE (gimple_assign_rhs1 (s));
tree op2_type = TREE_TYPE (gimple_assign_rhs2 (s));
tree l = build_int_cst (op2_type, 0);
// C is [0, N), but fortran is [0, N], so default to [0, N].
tree u = build_int_cst (op2_type, element_precision (op1_type));
int_range_max shift (l, u);
add_range (gimple_assign_rhs2 (s), shift);
I build a range for the RHS shift-by operand (op2_type) from 0 to the precision
of the left operand (op1_type)... THats all we were using op1 for. I was
just under the misimpression that op1 would have a TYPE_PRECISION, not
realizing vectors could be there and they don't set that field.
I believe that to be correct?