aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/vect/pr63530.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/vect/pr63530.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/vect/pr63530.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/vect/pr63530.c b/gcc-4.9/gcc/testsuite/gcc.dg/vect/pr63530.c
new file mode 100644
index 0000000..b583b9b
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/vect/pr63530.c
@@ -0,0 +1,30 @@
+/* { dg-options "-O2 -ftree-vectorize -funroll-loops --param \"max-completely-peeled-insns=400\"" } */
+
+/* PR tree-optimization/63530 */
+/* On armv7 hardware, following options cause run time failure */
+/* -march=armv7-a -mfloat-abi=hard -mfpu=neon -marm -O2 -ftree-vectorize */
+/* -funroll-loops --param "max-completely-peeled-insns=400" */
+
+#include <stdlib.h>
+
+typedef struct {
+ unsigned char map[256];
+ int i;
+} A, *AP;
+
+AP __attribute__ ((noinline))
+foo (int n)
+{
+ AP b = (AP)calloc (1, sizeof (A));
+ int i;
+ for (i = n; i < 256; i++)
+ b->map[i] = i;
+ return b;
+}
+
+int
+main()
+{
+ AP p = foo(3);
+ return p->map[30] - p->map[20] - p->map[10];
+}