------- Comment #6 from rguenther at suse dot de  2009-01-22 09:29 -------
Subject: Re:  ICE in set_value_range, at
 tree-vrp.c:398

On Thu, 22 Jan 2009, bonzini at gnu dot org wrote:

> ------- Comment #4 from bonzini at gnu dot org  2009-01-22 09:00 -------
> In PRE there is a fold_convert_const_int_from_int call simplifying "(signed
> char) 249"  to -7, but setting the TREE_OVERFLOW flag in the meanwhile.  I
> don't think it makes sense to set the overflow flag on a NOP:
> 
>    * `The result of, or the signal raised by, converting an integer to a
>      signed integer type when the value cannot be represented in an
>      object of that type (C90 6.2.1.2, C99 6.3.1.3).'
> 
>      For conversion to a type of width N, the value is reduced modulo
>      2^N to be within range of the type; no signal is raised.
> 
> (Integers implementation, from the gcc manual).

Correct.  PRE should make sure to clear TREE_OVERFLOW, like CCP for
example does.  A more general solution unfortunately opens too many
cans of worms.

Richard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38932

Reply via email to