This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug Report: loop optimizer causes invalid value in gcc version 20000108



The following test fails with -O2    (or with -fstrength-reduce)

I will be attempting to fix, any information or help is welcomed.

Regards
Jose Luu
-----------------------------------------------------------
#include <stdio.h>

int main ()
{
    int nResult;
    int b=0;
    int i = -1;
    printf ("i = %d, b = %d\n", i, b);

    do
    {
 printf ("i = %d, b = %d\n", i, b);
     if (b!=0) {
  printf ("test FAIL \n");
  nResult=1;
     } else {
  printf ("test PASS \n");
  nResult=0;
  }
 i++;
        b=(i+2)*4;
    } while (i < 0);
    return nResult;
}



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]