------- Comment #15 from rguenth at gcc dot gnu dot org 2009-07-24 20:01 ------- The short explanation is that we did not properly walk DECL_INITIAL of the vars in the BIND_EXPR. Not with walking BIND_EXPR_VARS either because we stop at VAR_DECLs in cp_genericize_r before walking its DECL_INITIAL. walk_tree does not have this issue because it does not walk the VAR_DECLs directly but only certain fields of it.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834