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

--- Comment #5 from kugan at gcc dot gnu.org ---
(In reply to Marek Polacek from comment #4)
> This should fix it:
> 
> --- a/gcc/calls.c
> +++ b/gcc/calls.c
> @@ -1270,7 +1270,7 @@ get_size_range (tree exp, tree range[2])
>  
>    wide_int min, max;
>    enum value_range_type range_type
> -    = (TREE_CODE (exp) == SSA_NAME
> +    = ((TREE_CODE (exp) == SSA_NAME && INTEGRAL_TYPE_P (TREE_TYPE (exp)))
>         ? get_range_info (exp, &min, &max) : VR_VARYING);
>  
>    if (range_type == VR_VARYING)

Looked at the other uses of get_range_info too. There are uses of this in
gcc/gimple-ssa-warn-alloca.c without the check for INTEGRAL_TYPE_P but I think
it is intentional.

Reply via email to