------- Comment #10 from mark at codesourcery dot com  2006-01-04 00:01 -------
Subject: Re:  [4.0/4.1/4.2 Regression] ICE with const int copied
 into two different functions

rakdver at atrey dot karlin dot mff dot cuni dot cz wrote:

>    tree const_expr = expr;
>    do
>      {
>        expr = fold_non_dependent_expr (const_expr);
>        const_expr = integral_constant_value (expr);
>      }
>    while (expr != const_expr);
> 
> and if constant_value_1 (called by integral_constant_value) unshares the
> expression unconditionally (not only when it processes DECL_INITIAL),
> this loop never ends.

OK; then call unshare_expr after the "break" statement in
constant_value_1, and before "decl = init;".


-- 


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


Reply via email to