------- Comment #4 from rguenth at gcc dot gnu dot org 2008-09-08 15:14 ------- It actually is the correct fix. We valueize expressions in-place, and copy visiting doesn't follow the chain up until a constant. So we have
a = 0; = VIEW_CONVERT_EXPR <a>; b = a; = VIEW_CONVERT_EXPR <b>; we first insert VIEW_CONVERT_EXPR <0> in the table, then during processing of VIEW_CONVERT_EXPR <b> we valueize it to VIEW_CONVERT_EXPR <a> which is not in the table. During insertion we valueize again, now getting VIEW_CONVERT_EXPR <0> which is already in the table so we hit the assert. Bootstrapping and testing the fix now. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37421