File: polytypes.c

package info (click to toggle)
gcc-arm-none-eabi 15%3A8-2019-q3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 571,828 kB
  • sloc: ansic: 2,937,651; cpp: 881,644; ada: 597,189; makefile: 65,528; asm: 56,499; xml: 46,621; exp: 24,747; sh: 19,684; python: 7,256; pascal: 4,370; awk: 3,497; perl: 2,695; yacc: 316; ml: 285; f90: 234; lex: 198; objc: 194; haskell: 119
file content (48 lines) | stat: -rw-r--r-- 1,669 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* Check that NEON polynomial vector types are suitably incompatible with
   integer vector types of the same layout.  */

/* { dg-do compile } */
/* { dg-require-effective-target arm_neon_ok } */
/* { dg-add-options arm_neon } */

#include <arm_neon.h>

void s64_8 (int8x8_t a) {}
void u64_8 (uint8x8_t a) {}
void p64_8 (poly8x8_t a) {}
void s64_16 (int16x4_t a) {}
void u64_16 (uint16x4_t a) {}
void p64_16 (poly16x4_t a) {}

void s128_8 (int8x16_t a) {}
void u128_8 (uint8x16_t a) {}
void p128_8 (poly8x16_t a) {}
void s128_16 (int16x8_t a) {}
void u128_16 (uint16x8_t a) {}
void p128_16 (poly16x8_t a) {}

void foo ()
{
  poly8x8_t v64_8;
  poly16x4_t v64_16;
  poly8x16_t v128_8;
  poly16x8_t v128_16;

  s64_8 (v64_8); /* { dg-message "use -flax-vector-conversions" } */
  /* { dg-error "incompatible type for argument 1 of 's64_8'" "" { target *-*-* } .-1 } */
  u64_8 (v64_8); /* { dg-error "incompatible type for argument 1 of 'u64_8'" } */
  p64_8 (v64_8);

  s64_16 (v64_16); /* { dg-error "incompatible type for argument 1 of 's64_16'" } */
  u64_16 (v64_16); /* { dg-error "incompatible type for argument 1 of 'u64_16'" } */
  p64_16 (v64_16);

  s128_8 (v128_8); /* { dg-error "incompatible type for argument 1 of 's128_8'" } */
  u128_8 (v128_8); /* { dg-error "incompatible type for argument 1 of 'u128_8'" } */
  p128_8 (v128_8);

  s128_16 (v128_16); /* { dg-error "incompatible type for argument 1 of 's128_16'" } */
  u128_16 (v128_16); /* { dg-error "incompatible type for argument 1 of 'u128_16'" } */
  p128_16 (v128_16);
}
/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } 0 } */