Add compile command to each testcase
[gcc-vect-testsuite.git] / pr44507.c
blob50c485399a494080667c8bb19c172a0dbfc8ed43
1 /* { dg-require-effective-target vect_int } */
3 #include <stdlib.h>
4 #include "tree-vect.h"
6 int seeIf256ByteArrayIsConstant(
7 unsigned char *pArray)
9 int index;
10 unsigned int curVal, orVal, andVal;
11 int bytesAreEqual = 0;
13 if (pArray != 0)
15 for (index = 0, orVal = 0, andVal = 0xFFFFFFFF;
16 index < 64;
17 index += (int)sizeof(unsigned int))
19 curVal = *((unsigned int *)(&pArray[index]));
20 orVal = orVal | curVal;
21 andVal = andVal & curVal;
24 if (!((orVal == andVal)
25 && ((orVal >> 8) == (andVal & 0x00FFFFFF))))
26 abort ();
29 return 0;
33 int main(int argc, char** argv)
35 unsigned char array1[64] = {
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,
43 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
46 argv = argv;
47 argc = argc;
49 check_vect ();
51 return seeIf256ByteArrayIsConstant(&array1[0]);
54 /* { dg-final { cleanup-tree-dump "vect" } } */