[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug tree-optimization/18694] [4.0 regression] loop miscompilation at -O1 (-ftree-ch)



------- Additional Comments From kazu at cs dot umass dot edu  2004-12-09 00:47 -------
I took Steven's testcase in comment #12,
fed into GCC,
took its .t13.cfg output,
reformatted into C code,
fed that back into GCC with -O0,
and now I get the "5 5 garbage".

I separated main() to a separate file by the way.
Otherwise, I don't see the problem. 

int
divisors_bug (int *t, int e)
{
  int * d;
  int * ivtmp7;
  int * D1176;
  unsigned int ivtmp14;
  int * d22;
  unsigned int e0;
  int D1132;

  d = t + 1;
  *d = 5;
  if (e != 0) goto L2; else goto L7;

 L22:;
  ivtmp7 = D1176;

 L1:;
  d22 = d22 + 1;
  D1176 = ivtmp7 + 1;
  D1132 = *D1176;
  *d22 = D1132;
  if (d > D1176) goto L22; else goto L3;

 L3:;
  ivtmp14 = 0;

 L24:;
  ivtmp14 = ivtmp14 + 1;
  e0 = (unsigned int) e;
  if (e0 != ivtmp14) goto L24; else goto L7;

 L2:;
  if (t < d) goto L23; else goto L3;

 L23:;
  d22 = d;
  ivtmp7 = t;
  goto L1;

 L7:;
  return;
}



-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



Reply to: