Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-18.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv_zvl256b -mabi=lp64d -O3 -mrvv-vector-bits=zvl" } */
3
4 #include "riscv_rvv_vector_bits.h"
5
6 DEF_FIXED_TYPE (vint32m1_t, 256)
7 DEF_FIXED_TYPE (vfloat32m1_t, 256)
8 DEF_FIXED_TYPE (vbool1_t, 256)
9 DEF_FIXED_TYPE (vbool2_t, 128)
10
11 fixed_vint32m1_t
12 test_1 (fixed_vint32m1_t a, fixed_vint32m1_t b)
13 {
14 return a == b;
15 }
16
17 fixed_vbool1_t
18 test_2 (fixed_vint32m1_t a, fixed_vint32m1_t b)
19 {
20 return a == b;
21 }
22
23 fixed_vfloat32m1_t
24 test_3 (fixed_vfloat32m1_t a, fixed_vfloat32m1_t b)
25 {
26 return a == b;
27 }
28
29 fixed_vbool1_t
30 test_4 (fixed_vfloat32m1_t a, fixed_vfloat32m1_t b)
31 {
32 return a == b;
33 }
34
35 fixed_vbool2_t
36 test_5 (fixed_vint32m1_t a, fixed_vint32m1_t b)
37 {
38 return a == b; /* { dg-error {incompatible types when returning type '__vector\(8\) int' but 'fixed_vbool2_t' {aka 'vbool2_t'} was expected} } */
39 }
40
41 fixed_vbool2_t
42 test_6 (fixed_vfloat32m1_t a, fixed_vfloat32m1_t b)
43 {
44 return a == b; /* { dg-error {incompatible types when returning type '__vector\(8\) int' but 'fixed_vbool2_t' {aka 'vbool2_t'} was expected} } */
45 }