Fix bootstrap failure for bare metal due to autoconf link tests
[official-gcc.git] / gcc / testsuite / c-c++-common / vector-compare-4.c
blobe7d37eb8459209c165794f4fa8458b21775d420d
1 /* PR c/68062 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wsign-compare -Wno-psabi" } */
4 /* Ignore warning on some powerpc configurations. */
5 /* { dg-prune-output "non-standard ABI extension" } */
7 typedef signed char __attribute__ ((vector_size (4))) v4qi;
8 typedef unsigned char __attribute__ ((vector_size (4))) uv4qi;
9 typedef signed int __attribute__ ((vector_size (4 * __SIZEOF_INT__))) v4si;
10 typedef unsigned int __attribute__ ((vector_size (4 * __SIZEOF_INT__))) uv4si;
12 v4qi
13 fn1 (void)
15 v4qi a = { 1, 2, 3, 4 };
16 uv4qi b = { 4, 3, 2, 1 };
17 v4qi v = { 0, 0, 0, 0 };
19 v += (a == b); /* { dg-warning "comparison between types" } */
20 v += (a != b); /* { dg-warning "comparison between types" } */
21 v += (a >= b); /* { dg-warning "comparison between types" } */
22 v += (a <= b); /* { dg-warning "comparison between types" } */
23 v += (a > b); /* { dg-warning "comparison between types" } */
24 v += (a < b); /* { dg-warning "comparison between types" } */
26 return v;
29 v4si
30 fn2 (void)
32 v4si a = { 1, 2, 3, 4 };
33 uv4si b = { 4, 3, 2, 1 };
34 v4si v = { 0, 0, 0, 0 };
36 v += (a == b); /* { dg-warning "comparison between types" } */
37 v += (a != b); /* { dg-warning "comparison between types" } */
38 v += (a >= b); /* { dg-warning "comparison between types" } */
39 v += (a <= b); /* { dg-warning "comparison between types" } */
40 v += (a > b); /* { dg-warning "comparison between types" } */
41 v += (a < b); /* { dg-warning "comparison between types" } */
43 return v;