Hi,

I notice that aarch64 simd index range message not correct on 32 bit host.

The message print by the function aarch64_simd_lane_bounds in aarch64.c.

The function print HOST_WIDE_INT variable by %ld which is correct on
64 bit host.

However, on 32 bit host HOST_WIDE_INT would be long long.

Therefore, print out incorrect message on 32 bit host.

Fix the message by printing HOST_WIDE_INT variables on 32 bit host by %lld.


Shiva
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 083b9b4..49b007e 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -8903,9 +8903,21 @@ aarch64_simd_lane_bounds (rtx operand, HOST_WIDE_INT 
low, HOST_WIDE_INT high,
   if (lane < low || lane >= high)
   {
     if (exp)
-      error ("%Klane %ld out of range %ld - %ld", exp, lane, low, high - 1);
+      {
+#if INT64_T_IS_LONG
+        error ("%Klane %ld out of range %ld - %ld", exp, lane, low, high - 1);
+#else
+        error ("%Klane %lld out of range %lld - %lld", exp, lane, low, high - 
1);
+#endif
+      }
     else
-      error ("lane %ld out of range %ld - %ld", lane, low, high - 1);
+      {
+#if INT64_T_IS_LONG
+        error ("lane %ld out of range %ld - %ld", lane, low, high - 1);
+#else
+        error ("lane %lld out of range %lld - %lld", lane, low, high - 1);
+#endif
+      }
   }
 }
 

Attachment: ChangeLog.fix_simd_index_message
Description: Binary data

Reply via email to