On 08/24/2018 01:06 PM, Martin Sebor wrote:
> PR 87059 points out an ICE in the recently enhanced VRP code
> that was traced back to a MIN_EXPR built out of operands of
> types with different sign by expand_builtin_strncmp().
> 
> The attached patch adjusts the function to make sure both
> operands have the same type, and to make these mismatches
> easier to detect, also adds an assertion to fold_binary_loc()
> for these expressions.
> 
> Bootstrapped on x86_64-linux.
> 
> Martin
> 
> PS Aldy, I have not tested this on powerpc64le.
> 
> gcc-87059.diff
> 
> 
> PR tree-optimization/87059 - internal compiler error: in set_value_range
> 
> gcc/ChangeLog:
> 
>       PR tree-optimization/87059
>       * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
>       to the same type as the other.
>       * fold-const.c (fold_binary_loc): Assert expectation.
I bootstrapped (but did not regression test) this on ppc64le and also
built the linux kernel (which is where my tester tripped over this problem).

Approved and installed on the trunk.

jeff

Reply via email to