[Bug tree-optimization/59038] [4.9 Regression] r204398 causes 186.crafty init.c to be miscompiled

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 7 13:15:00 GMT 2013


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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
extern void abort (void);

unsigned char first_ones_8bit[256];
unsigned char connected_passed[256];

int
main ()
{
  int i, j;
  for (i=0;i<256;i++){
      connected_passed[i]=0;
      first_ones_8bit[i]=0;
      for (j=7;j>0;j--){
          if ((i & (3<<(7-j))) == (3<<(7-j))){
              connected_passed[i]=j;
              break;
          }
      }
  }
  if (connected_passed[3] != 7)
    abort ();
  return 0;
}



More information about the Gcc-bugs mailing list