https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77855
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Thu Oct 6 12:17:53 2016 New Revision: 240832 URL: https://gcc.gnu.org/viewcvs?rev=240832&root=gcc&view=rev Log: 2016-10-06 Richard Biener <rguent...@suse.de> PR tree-optimization/77855 * tree-ssa-pre.c (prune_clobbered_mems): Queue exprs to remove instead of removing the current item while iterating over the set which is not safe. * gcc.dg/torture/pr77855.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/torture/pr77855.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-pre.c