------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-11 19:43 ------- Here is an example which shows that IV-OPTs is not the cause and that we have the same issue and shows what is going wrong clearer: int k(int); int h(void); long h1(void);
int f(int i) { int oldii; int ii; ii = h1(); do { oldii = ii; k(ii); ii = oldii + h(); } while (i<ii); return oldii; } We remove the use of oldii and use ii_n instead, I think we are coalescing the wrong two ii_n and not the two inside the loop but the one that was called oldii with the one before the loop. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21488