comparison gcc/testsuite/gcc.target/arm/acle/cde-mve-error-1.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
1 #include "arm_cde.h"
2
3 /* { dg-do assemble } */
4 /* { dg-require-effective-target arm_v8_1m_main_cde_mve_fp_ok } */
5 /* { dg-add-options arm_v8_1m_main_cde_mve_fp } */
6
7 /* Ensure the error messages make sense when passing too many/too few arguments
8 to the intrinsic user-facing functions. */
9 uint8x16_t test_invalid_arguments (uint8x16_t n, uint8x16_t m)
10 {
11 uint8x16_t accum = __arm_vcx1q_u8 (0, 33, 1); /* { dg-error {macro "__arm_vcx1q_u8" passed 3 arguments, but takes just 2} } */
12 accum += __arm_vcx1qa (0, accum, 33, 1); /* { dg-error {macro "__arm_vcx1qa" passed 4 arguments, but takes just 3} } */
13 accum += __arm_vcx2q_u8 (0, n, 33, 1); /* { dg-error {macro "__arm_vcx2q_u8" passed 4 arguments, but takes just 3} } */
14 accum += __arm_vcx2q (0, n, 33, 1); /* { dg-error {macro "__arm_vcx2q" passed 4 arguments, but takes just 3} } */
15 accum += __arm_vcx2qa (0, accum, n, 33, 1); /* { dg-error {macro "__arm_vcx2qa" passed 5 arguments, but takes just 4} } */
16 accum += __arm_vcx3q_u8 (0, n, m, 33, 1); /* { dg-error {macro "__arm_vcx3q_u8" passed 5 arguments, but takes just 4} } */
17 accum += __arm_vcx3q (0, n, m, 33, 1); /* { dg-error {macro "__arm_vcx3q" passed 5 arguments, but takes just 4} } */
18 accum += __arm_vcx3qa (0, accum, n, m, 33, 1); /* { dg-error {macro "__arm_vcx3qa" passed 6 arguments, but takes just 5} } */
19 accum += __arm_vcx1q_u8 (0); /* { dg-error {macro "__arm_vcx1q_u8" requires 2 arguments, but only 1 given} } */
20 accum += __arm_vcx1qa (0, accum); /* { dg-error {macro "__arm_vcx1qa" requires 3 arguments, but only 2 given} } */
21 accum += __arm_vcx2q_u8 (0, n); /* { dg-error {macro "__arm_vcx2q_u8" requires 3 arguments, but only 2 given} } */
22 accum += __arm_vcx2q (0, n); /* { dg-error {macro "__arm_vcx2q" requires 3 arguments, but only 2 given} } */
23 accum += __arm_vcx2qa (0, accum, n); /* { dg-error {macro "__arm_vcx2qa" requires 4 arguments, but only 3 given} } */
24 accum += __arm_vcx3q_u8 (0, n, m); /* { dg-error {macro "__arm_vcx3q_u8" requires 4 arguments, but only 3 given} } */
25 accum += __arm_vcx3q (0, n, m); /* { dg-error {macro "__arm_vcx3q" requires 4 arguments, but only 3 given} } */
26 accum += __arm_vcx3qa (0, accum, n, m); /* { dg-error {macro "__arm_vcx3qa" requires 5 arguments, but only 4 given} } */
27
28 accum += __arm_vcx1q_m (0, accum, 33, 1, 4); /* { dg-error {macro "__arm_vcx1q_m" passed 5 arguments, but takes just 4} } */
29 accum += __arm_vcx1qa_m (0, accum, 33, 1, 4); /* { dg-error {macro "__arm_vcx1qa_m" passed 5 arguments, but takes just 4} } */
30 accum += __arm_vcx2q_m (0, accum, n, 33, 1, 4); /* { dg-error {macro "__arm_vcx2q_m" passed 6 arguments, but takes just 5} } */
31 accum += __arm_vcx2qa_m (0, accum, n, 33, 1, 4); /* { dg-error {macro "__arm_vcx2qa_m" passed 6 arguments, but takes just 5} } */
32 accum += __arm_vcx3q_m (0, accum, n, m, 33, 1, 4); /* { dg-error {macro "__arm_vcx3q_m" passed 7 arguments, but takes just 6} } */
33 accum += __arm_vcx3qa_m (0, accum, n, m, 33, 1, 4); /* { dg-error {macro "__arm_vcx3qa_m" passed 7 arguments, but takes just 6} } */
34 accum += __arm_vcx1q_m (0, accum, 4); /* { dg-error {macro "__arm_vcx1q_m" requires 4 arguments, but only 3 given} } */
35 accum += __arm_vcx1qa_m (0, accum, 4); /* { dg-error {macro "__arm_vcx1qa_m" requires 4 arguments, but only 3 given} } */
36 accum += __arm_vcx2q_m (0, accum, n, 4); /* { dg-error {macro "__arm_vcx2q_m" requires 5 arguments, but only 4 given} } */
37 accum += __arm_vcx2qa_m (0, accum, n, 4); /* { dg-error {macro "__arm_vcx2qa_m" requires 5 arguments, but only 4 given} } */
38 accum += __arm_vcx3q_m (0, accum, n, m, 4); /* { dg-error {macro "__arm_vcx3q_m" requires 6 arguments, but only 5 given} } */
39 accum += __arm_vcx3qa_m (0, accum, n, m, 4); /* { dg-error {macro "__arm_vcx3qa_m" requires 6 arguments, but only 5 given} } */
40
41 /* The preprocessor complains that the macro was given an invalid number of
42 arguments, and because of that ends up not expanding the macro but
43 rather just leaving the macro name in the source code. That macro name
44 results in these errors. */
45 /* { dg-error {'__arm_vcx1q_u8' undeclared \(first use in this function\)} "" { target { *-*-* } } 11 } */
46 /* { dg-error {'__arm_vcx1qa' undeclared \(first use in this function\)} "" { target { *-*-* } } 12 } */
47 /* { dg-error {'__arm_vcx2q_u8' undeclared \(first use in this function\)} "" { target { *-*-* } } 13 } */
48 /* { dg-error {'__arm_vcx2q' undeclared \(first use in this function\)} "" { target { *-*-* } } 14 } */
49 /* { dg-error {'__arm_vcx2qa' undeclared \(first use in this function\)} "" { target { *-*-* } } 15 } */
50 /* { dg-error {'__arm_vcx3q_u8' undeclared \(first use in this function\)} "" { target { *-*-* } } 16 } */
51 /* { dg-error {'__arm_vcx3q' undeclared \(first use in this function\)} "" { target { *-*-* } } 17 } */
52 /* { dg-error {'__arm_vcx3qa' undeclared \(first use in this function\)} "" { target { *-*-* } } 18 } */
53
54 /* { dg-error {'__arm_vcx1q_m' undeclared \(first use in this function\)} "" { target { *-*-* } } 28 } */
55 /* { dg-error {'__arm_vcx1qa_m' undeclared \(first use in this function\)} "" { target { *-*-* } } 29 } */
56 /* { dg-error {'__arm_vcx2q_m' undeclared \(first use in this function\)} "" { target { *-*-* } } 30 } */
57 /* { dg-error {'__arm_vcx2qa_m' undeclared \(first use in this function\)} "" { target { *-*-* } } 31 } */
58 /* { dg-error {'__arm_vcx3q_m' undeclared \(first use in this function\)} "" { target { *-*-* } } 32 } */
59 /* { dg-error {'__arm_vcx3qa_m' undeclared \(first use in this function\)} "" { target { *-*-* } } 33 } */
60
61 return accum;
62 }