// testcase, compile with "-O2 -fno-tree-dce -fno-tree-ccp -fno-tree-copy-prop
-fno-tree-dominator-opts"

int foo (void);

struct A {
  struct B {
    struct B *n;
  } *p;
};

static inline void baz (struct A *a)
{
  a->p = a->p->n;
}

void bar (struct A a)
{
  while (foo ())
    baz (&a);
  while (foo ());
}

-- 
           Summary: infinite loop in dse
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belyshev at depni dot sinp dot msu dot ru
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to