re PR target/65624 (ICE in aarch64-builtins.c when expanding 4-argument aarch64 intri...
authorMax Ostapenko <m.ostapenko@partner.samsung.com>
Wed, 1 Apr 2015 11:18:03 +0000 (14:18 +0300)
committerMaxim Ostapenko <chefmax@gcc.gnu.org>
Wed, 1 Apr 2015 11:18:03 +0000 (14:18 +0300)
2015-04-01  Max Ostapenko  <m.ostapenko@partner.samsung.com>

PR target/65624

gcc/
* config/aarch64/aarch64-builtins.c (aarch64_simd_expand_builtin): Increase
args array size by one to avoid buffer overflow.

gcc/testsuite/
* gcc.target/aarch64/pr65624.c: New test.

From-SVN: r221807

gcc/ChangeLog
gcc/config/aarch64/aarch64-builtins.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/pr65624.c [new file with mode: 0644]

index 9c39d764e0173521033a4790f11f0914610c5757..11a79db10a2378d4bfac55d4d3cc24f732b011c0 100644 (file)
@@ -1,3 +1,9 @@
+2015-04-01  Max Ostapenko  <m.ostapenko@partner.samsung.com>
+
+       PR target/65624
+       * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_builtin): Increase
+       args array size by one to avoid buffer overflow.
+
 2015-03-31  Jan Hubicka  <hubicka@ucw.cz>
 
        * lto-cgraph.c (lto_output_node, input_overwrite_node): Stream
index a9b330591eb6c15fdd90ff475c82d5d56a4d2143..8a9fff8720d274798b19fe017dacee17f131e501 100644 (file)
@@ -1025,7 +1025,7 @@ aarch64_simd_expand_builtin (int fcode, tree exp, rtx target)
   aarch64_simd_builtin_datum *d =
                &aarch64_simd_builtin_data[fcode - AARCH64_SIMD_PATTERN_START];
   enum insn_code icode = d->code;
-  builtin_simd_arg args[SIMD_MAX_BUILTIN_ARGS];
+  builtin_simd_arg args[SIMD_MAX_BUILTIN_ARGS + 1];
   int num_args = insn_data[d->code].n_operands;
   int is_void = 0;
   int k;
index 0dd0421fce7814e80cfe45a11ea0901acd804b43..24fbed7c7bd0616e32787f72636c4ec66eff923d 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-01  Max Ostapenko  <m.ostapenko@partner.samsung.com>
+
+       PR target/65624
+       * gcc.target/aarch64/pr65624.c: New test.
+
 2015-03-31  Jan Hubicka  <hubicka@ucw.cz>
 
        * gcc.dg/ipa/inlinehint-4.c: New testcase.
diff --git a/gcc/testsuite/gcc.target/aarch64/pr65624.c b/gcc/testsuite/gcc.target/aarch64/pr65624.c
new file mode 100644 (file)
index 0000000..8eb3786
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <arm_neon.h>
+
+int32x4_t
+foo (void)
+{
+  int32x4_t vector_int32x4;
+  int16x4_t vector3_int16x4;
+  int16x4_t vector4_int16x4;
+  static int32_t buffer_int32x4[32];
+
+  vector_int32x4 = vld1q_s32(buffer_int32x4);
+  return vqdmlsl_lane_s16(vector_int32x4, vector3_int16x4, vector4_int16x4, 0);
+}