Commit ea78906a by Richard Biener Committed by Richard Biener

re PR tree-optimization/57081 (Segmentation fault in simple_iv (tree-scalar-evolution.c:3151))

2013-04-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/57081
	* loop-init.c: Include tree-flow.h.
	(loop_optimizer_finalize): Free number of iteration estimates.
	* Makefile.in (loop-init.o): Add $(TREE_FLOW_H) dependency.

	* gcc.dg/torture/pr57081.c: New testcase.

From-SVN: r198392
parent 96cc0ef4
2013-04-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/57081
* loop-init.c: Include tree-flow.h.
(loop_optimizer_finalize): Free number of iteration estimates.
* Makefile.in (loop-init.o): Add $(TREE_FLOW_H) dependency.
2013-04-29 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/57083
......
......@@ -3181,7 +3181,7 @@ cfgloopmanip.o : cfgloopmanip.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
loop-init.o : loop-init.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(GGC_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) \
coretypes.h $(TM_H) $(OBSTACK_H) $(TREE_PASS_H) $(FLAGS_H) \
$(REGS_H) $(DF_H)
$(REGS_H) $(DF_H) $(TREE_FLOW_H)
loop-unswitch.o : loop-unswitch.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(DUMPFILE_H) \
$(RTL_H) $(TM_H) $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(PARAMS_H) \
......
......@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
#include "df.h"
#include "ggc.h"
#include "tree-flow.h"
/* Apply FLAGS to the loop state. */
......@@ -142,6 +143,8 @@ loop_optimizer_finalize (void)
if (loops_state_satisfies_p (LOOPS_HAVE_RECORDED_EXITS))
release_recorded_exits ();
free_numbers_of_iterations_estimates ();
/* If we should preserve loop structure, do not free it but clear
flags that advanced properties are there as we are not preserving
that in full. */
......
2013-04-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/57081
* gcc.dg/torture/pr57081.c: New testcase.
2013-04-29 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/57083
......
/* { dg-do compile } */
int a;
void f(void)
{
int b;
if(0)
lbl:
goto lbl;
if(b)
{
int p = 0;
goto lbl;
}
a = 0;
while(b++);
goto lbl;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment