Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / nvptx / v2si-cvt.c
blob73f86bcfa9e3d0066ef6e6bd73df7e9396230125
1 /* { dg-do assemble } */
2 /* { dg-options "-O2 -save-temps" } */
4 typedef int __v2si __attribute__((__vector_size__(8)));
6 int __attribute__((unused))
7 vector_cvt (__v2si arg)
9 __v2si val4 = arg;
10 char *p = (char*)&val4;
12 if (p[0] != 1)
13 return 1;
14 if (p[1] != 2)
15 return 1;
16 if (p[2] != 3)
17 return 1;
19 return 0;
22 int
23 vector_cvt_2 (__v2si val, __v2si val2)
25 char *p = (char*)&val;
26 char *p2 = (char*)&val2;
28 if (p[0] != p2[0])
29 return 1;
30 if (p[4] != p2[4])
31 return 1;
33 return 0;
36 /* We want to test for 'mov.t' here, but given PR80845 we test for cvt.t.t
37 instead.
38 { dg-final { scan-assembler "(?n)cvt\\.u32\\.u32.*\\.x" } } */
39 /* { dg-final { scan-assembler "(?n)cvt\\.u16\\.u32.*\\.x" } } */