http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56029
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-18 16:54:56 UTC --- Created attachment 29209 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29209 gcc48-pr56029.patch The bug is that neither reserve_phi_args_for_new_edge nor remove_phi_arg_num clears gimple_phi_arg_location (only resize_phi_node does), so if some GIMPLE_PHI references some BLOCK in some argument, then that phi is shrunk a little bit where that argument is no longer used, then we remove unused blocks and then grow the same PHI again and nothing overrides gimple_phi_arg_location of the added argument, the old location magically reappears. This patch fixes this on the reserve_phi_args_for_new_edge side. Of course the question is also why the caller doesn't set gimple_phi_arg_location for something, but I'd say the code just should be robust in any case and when it isn't called explicitly, UNKNOWN_LOCATION should be in there.