[Bug tree-optimization/23588] CCP not fully propagating constants
dberlin at dberlin dot org
gcc-bugzilla@gcc.gnu.org
Wed Sep 7 13:36:00 GMT 2005
------- Additional Comments From dberlin at gcc dot gnu dot org 2005-09-07 13:36 -------
Subject: Re: CCP not fully propagating
constants
On Wed, 2005-09-07 at 04:19 +0000, pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-07 04:19 -------
> (In reply to comment #3)
> > And then we hit an assert if we change evaluate_stmt to be always call fold_ccp.
> > The assert is in set_lattice_value, when we are changing from VARRYING to CONSTANT which should
> > be a valid transition.
>
> Only if the VARRYING is the default state.
> Before the TCB, this was allowed:
> /* VARYING -> CONSTANT is an invalid state transition, except
> for objects which start off in a VARYING state. */
>
VARYING->CONSTANT should actually never happen, regardless of what the
comment says.
We shouldn't set it to VARYING in the first place if we think it has a
chance of becoming CONSTANT.
So i imagine get_default_value or whatever needs to be more
foregiving :)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23588
More information about the Gcc-bugs
mailing list