Re: [PATCH] c++: ICE when shortening right shift [PR94955]

2020-05-18 Thread Jason Merrill via Gcc-patches
On 5/6/20 4:31 PM, Marek Polacek wrote: Since r10-6527 fold_for_warn calls maybe_constant_value, which means it can fold more than it previously could. In this testcase it means that cp_build_binary_op/RSHIFT_EXPR set short_shift because now we were able to fold op1 to an INTEGER_CST. But then

[PATCH] c++: ICE when shortening right shift [PR94955]

2020-05-06 Thread Marek Polacek via Gcc-patches
Since r10-6527 fold_for_warn calls maybe_constant_value, which means it can fold more than it previously could. In this testcase it means that cp_build_binary_op/RSHIFT_EXPR set short_shift because now we were able to fold op1 to an INTEGER_CST. But then when actually performing the shortening we