[Bug tree-optimization/17358] New: infinite loop due to incorrect updating of the dominator tree

steven at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Sep 8 19:45:00 GMT 2004


// Reduced from vorbis-tools 1.0.1
// 
// gcc -O vcut.i
//
// Goes into an infinite loop after thread_jumps mis-updates
// the dominator information in the cfg cleanup called from 
// execute_cleanup_cfg_post_optimize.
// Happens on many targets.

extern int clobber_k (int *);
extern int barrier (void);

int process_second_stream(void)
{
  int k;
  int i = 0, j = 0, result;

  clobber_k (&k);

  while(barrier ())
    ;

  while(!j)
    {
      while(!j)
        {
          result=barrier ();
          if (result == 0)
            break;
          else if(result==-1)
            barrier ();
          else
            {
              if(barrier ())
                j=1;
              while(1)
                {
                  result = barrier ();
                  if(result==0)
                    break;
                  k = i++;
                }
            }
        }

      if(!j && barier ())
        j=1;
    }

  return 0;
}

-- 
           Summary: infinite loop due to incorrect updating of the dominator
                    tree
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list