From: Kyrylo Tkachov <[email protected]>

vcopy_lane deliberately diagnoses both out-of-range lane indices: the
old pragma-builtins checker used & rather than && for exactly that
reason, and neon_shape::check keeps doing so.
r17-2020-g4ff8e6ba9f4e ("aarch64: Port NEON lane get/set intrinsics to
pragma-based framework"), which moved vcopy_lane onto the new shape
framework, dropped the dg-error for the second index in the same commit,
so the test reports an excess error.  The diagnostic behaviour is
identical before and after that port, so the deleted directive was
almost certainly a leftover from an intermediate revision of the patch.

gcc/testsuite/ChangeLog:

        * gcc.target/aarch64/simd/mf8_data_2.c: Restore the dg-error for
        the second out-of-range lane index of vcopy_lane_mf8.

Signed-off-by: Kyrylo Tkachov <[email protected]>
---
 gcc/testsuite/gcc.target/aarch64/simd/mf8_data_2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/testsuite/gcc.target/aarch64/simd/mf8_data_2.c 
b/gcc/testsuite/gcc.target/aarch64/simd/mf8_data_2.c
index f69165219a8..0f923f247d4 100644
--- a/gcc/testsuite/gcc.target/aarch64/simd/mf8_data_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/simd/mf8_data_2.c
@@ -14,6 +14,7 @@ void test(mfloat8x8_t x8, mfloat8x16_t x16,
   vcopy_lane_mf8(x8, 0, x8, -1); /* { dg-error {passing -1 to argument 4 of 
'vcopy_lane_mf8', which expects a value in the range \[0, 7\]} } */
   vcopy_lane_mf8(x8, 0, x8, 8); /* { dg-error {passing 8 to argument 4 of 
'vcopy_lane_mf8', which expects a value in the range \[0, 7\]} } */
   vcopy_lane_mf8(x8, 100, x8, 100); /* { dg-error {passing 100 to argument 2 
of 'vcopy_lane_mf8', which expects a value in the range \[0, 7\]} } */
+  /* { dg-error {passing 100 to argument 4 of 'vcopy_lane_mf8', which expects 
a value in the range \[0, 7\]} "" { target *-*-* } .-1 } */
 
   vcopy_laneq_mf8(x8, -1, x16, 0); /* { dg-error {passing -1 to argument 2 of 
'vcopy_laneq_mf8', which expects a value in the range \[0, 7\]} } */
   vcopy_laneq_mf8(x8, 8, x16, 0); /* { dg-error {passing 8 to argument 2 of 
'vcopy_laneq_mf8', which expects a value in the range \[0, 7\]} } */
-- 
2.50.1 (Apple Git-155)

Reply via email to