view gcc/testsuite/gcc.c-torture/compile/pr43415.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-require-stack-size "256*8+4" } */

int main()                                                                      
{                                                                               
  unsigned long long table[256];                                          
  unsigned int i;
  for (i=0; i<256; ++i) {
      unsigned long long j;
      unsigned char x=i;
      for (j=0; j<5; ++j) {
	  x += x<<1;
	  x ^= x>>1;
      }
      for (j=0; j<5; ++j) {
	  x += x<<1;
	  x ^= x>>1;
      }
      for (j=0; j<5; ++j) {
	  x += x<<1;
	  x ^= x>>1;
      }
      for (j=0; j<5; ++j) {
	  x += x<<1;
	  x ^= x>>1;
      }
      for (j=0; j<5; ++j) {
	  x += x<<1;
	  x ^= x>>1;
      }
      table[i] ^= (((unsigned long long)x)<<16);
  }
  for (i=0; i<256; ++i) {
      if ((table[i]&0xff)==i)
	return 1;
  }
  return 0;
}