re PR tree-optimization/56426 (Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358)

2013-02-26  Marek Polacek  <polacek@redhat.com>

        PR tree-optimization/56426
        * tree-ssa-loop.c (tree_ssa_loop_init): Always call
        scev_initialize.

From-SVN: r196281
This commit is contained in:
Marek Polacek 2013-02-26 11:06:14 +00:00 committed by Marek Polacek
parent a6af0f4274
commit f1ad33546d
4 changed files with 37 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2013-02-26 Marek Polacek <polacek@redhat.com>
PR tree-optimization/56426
* tree-ssa-loop.c (tree_ssa_loop_init): Always call
scev_initialize.
2013-02-26 Richard Biener <rguenther@suse.de>
PR target/56444

View File

@ -1,3 +1,8 @@
2013-02-26 Marek Polacek <polacek@redhat.com>
PR tree-optimization/56426
* gcc.dg/pr56436.c: New test.
2013-02-26 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/56448

View File

@ -0,0 +1,22 @@
/* PR tree-optimization/56426 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
int a, *c;
void
f (void)
{
int b = 0;
for (a = 0;; a++)
if (--b)
{
if (a)
lbl:
a++;
c = &b;
goto lbl;
}
}

View File

@ -70,10 +70,13 @@ tree_ssa_loop_init (void)
| LOOPS_HAVE_RECORDED_EXITS);
rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);
/* We might discover new loops, e.g. when turning irreducible
regions into reducible. */
scev_initialize ();
if (number_of_loops () <= 1)
return 0;
scev_initialize ();
return 0;
}