[Bug rtl-optimization/48813] [4.4/4.5/4.6/4.7 Regression] Segfault with backward branch inside dead loop body

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 29 14:28:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48813

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-29 14:18:10 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139234
so might very well be latent before that.

Slightly cleaned up testcase:

/* PR rtl-optimization/48813 */
/* { dg-do compile } */
/* { dg-options "-Os -funroll-loops" } */

extern int a, b, c;
extern void foo (void);

int
bar (void)
{
  for (b = 0; b < 1; b++)
    {
      foo ();
      for (a = 2; a <= 1; a++)
        if (c)
          return bar ();
    }
  return 0;
}



More information about the Gcc-bugs mailing list