http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55935
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-11 14:40:45 UTC --- Created attachment 29148 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29148 gimple-fold Alternative to alternative canonicalize_constructor_val fix which I'm afraid could sometimes unshare up to 3 times. Or we could just tree orig_cval = cval = unshare_expr (cval); as the first thing in the function (and drop the unshare_expr in fold_gimple_assign of course).