Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/vect/pr44507.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-require-effective-target vect_int } */ #include "tree-vect.h" int seeIf256ByteArrayIsConstant( unsigned char *pArray) { int index; unsigned int curVal, orVal, andVal; int bytesAreEqual = 0; if (pArray != 0) { for (index = 0, orVal = 0, andVal = 0xFFFFFFFF; index < 64; index += (int)sizeof(unsigned int)) { curVal = *((unsigned int *)(&pArray[index])); orVal = orVal | curVal; andVal = andVal & curVal; } if (!((orVal == andVal) && ((orVal >> 8) == (andVal & 0x00FFFFFF)))) abort (); } return 0; } int main(int argc, char** argv) { unsigned char array1[64] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }; argv = argv; argc = argc; check_vect (); return seeIf256ByteArrayIsConstant(&array1[0]); }