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



--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> 2013-03-11 14:44:09 
UTC ---

The fortran test that fails is equivalent to the following (use -Ofast -g,

surprisingly it only fails in var tracking)



float f(double*a,double*b){

  double x=a[0]*b[0];

  x+=a[1]*b[1];

  x+=a[2]*b[2];

  x+=a[3]*b[3];

  return x;

}



This happens because of an infinite loop between simplify_associative_operation

and simplify_gen_binary (and a few others) which keeps shuffling the additions

around to try and canonicalize the expression. Some well placed tests whether

GET_CODE(*)==code could probably help, although I am a bit surprised that it

fails so seldom, and only in var-tracking.



I didn't investigate the problem with the reverse order, as stage3 failures (in

middle-end code) are hard to debug...

Reply via email to