------- Comment #11 from jason at gcc dot gnu dot org 2010-08-17 18:09 ------- There are two issues here:
1) expand_static_init decides whether a variable needs static initialization before gimplification, and 2) Richard's MEM_REF-related change to cp_gimplify_expr caused us to stop removing the copy in this example. It sounds like if we fix #2 then the patch Honza mentions having should do the trick. I'll do that. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45307