2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / arm / polytypes.c
blob110d62a87912643954a93b5c20b49ca7a2c20ad5
1 /* Check that NEON polynomial vector types are suitably incompatible with
2 integer vector types of the same layout. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target arm_neon_ok } */
6 /* { dg-add-options arm_neon } */
8 #include <arm_neon.h>
10 void s64_8 (int8x8_t a) {}
11 void u64_8 (uint8x8_t a) {}
12 void p64_8 (poly8x8_t a) {}
13 void s64_16 (int16x4_t a) {}
14 void u64_16 (uint16x4_t a) {}
15 void p64_16 (poly16x4_t a) {}
17 void s128_8 (int8x16_t a) {}
18 void u128_8 (uint8x16_t a) {}
19 void p128_8 (poly8x16_t a) {}
20 void s128_16 (int16x8_t a) {}
21 void u128_16 (uint16x8_t a) {}
22 void p128_16 (poly16x8_t a) {}
24 void foo ()
26 poly8x8_t v64_8;
27 poly16x4_t v64_16;
28 poly8x16_t v128_8;
29 poly16x8_t v128_16;
31 s64_8 (v64_8); /* { dg-message "use -flax-vector-conversions" } */
32 /* { dg-error "incompatible type for argument 1 of 's64_8'" "" { target *-*-* } .-1 } */
33 u64_8 (v64_8); /* { dg-error "incompatible type for argument 1 of 'u64_8'" } */
34 p64_8 (v64_8);
36 s64_16 (v64_16); /* { dg-error "incompatible type for argument 1 of 's64_16'" } */
37 u64_16 (v64_16); /* { dg-error "incompatible type for argument 1 of 'u64_16'" } */
38 p64_16 (v64_16);
40 s128_8 (v128_8); /* { dg-error "incompatible type for argument 1 of 's128_8'" } */
41 u128_8 (v128_8); /* { dg-error "incompatible type for argument 1 of 'u128_8'" } */
42 p128_8 (v128_8);
44 s128_16 (v128_16); /* { dg-error "incompatible type for argument 1 of 's128_16'" } */
45 u128_16 (v128_16); /* { dg-error "incompatible type for argument 1 of 'u128_16'" } */
46 p128_16 (v128_16);
48 /* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } 0 } */