Fix PR80048

Submitted by Richard Guenther on March 17, 2017, 11:02 a.m.

Details

Message ID alpine.LSU.2.20.1703171202010.30051@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Guenther March 17, 2017, 11:02 a.m.
Bootstrapped / tested on x86_64-unknown-linux-gnu, applied.

Richard.

2017-03-17  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80048
	* sese.c (free_sese_info): Properly release rename_map and
	copied_bb_map elements.

Patch hide | download patch | download mbox

Index: gcc/sese.c
===================================================================
--- gcc/sese.c	(revision 246188)
+++ gcc/sese.c	(working copy)
@@ -199,11 +199,11 @@  free_sese_info (sese_info_p region)
   region->loop_nest.release ();
 
   for (rename_map_t::iterator it = region->rename_map->begin ();
-       it != region->rename_map->begin (); ++it)
+       it != region->rename_map->end (); ++it)
     (*it).second.release ();
 
   for (bb_map_t::iterator it = region->copied_bb_map->begin ();
-       it != region->copied_bb_map->begin (); ++it)
+       it != region->copied_bb_map->end (); ++it)
     (*it).second.release ();
 
   delete region->rename_map;