This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/23588] CCP not fully propagating constants
- From: "dberlin at dberlin dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Sep 2005 13:36:10 -0000
- Subject: [Bug tree-optimization/23588] CCP not fully propagating constants
- References: <20050827022854.23588.dberlin@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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