This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/25632] [4.0/4.1/4.2 Regression] ICE with const int copied into two different functions



------- 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]