1 /* { dg-require-effective-target vect_int } */
5 int seeIf256ByteArrayIsConstant(
9 unsigned int curVal
, orVal
, andVal
;
10 int bytesAreEqual
= 0;
14 for (index
= 0, orVal
= 0, andVal
= 0xFFFFFFFF;
16 index
+= (int)sizeof(unsigned int))
18 curVal
= *((unsigned int *)(&pArray
[index
]));
19 orVal
= orVal
| curVal
;
20 andVal
= andVal
& curVal
;
23 if (!((orVal
== andVal
)
24 && ((orVal
>> 8) == (andVal
& 0x00FFFFFF))))
32 int main(int argc
, char** argv
)
34 unsigned char array1
[64] = {
35 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
36 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
37 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
38 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
39 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
40 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
41 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
42 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
50 return seeIf256ByteArrayIsConstant(&array1
[0]);