aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gcc.dg/vect
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2013-08-05 15:18:29 -0700
committerBen Cheng <bccheng@google.com>2013-08-05 16:03:48 -0700
commit32fce3edda831e36ee484406c39dffbe0230f257 (patch)
tree733b1b5398304b260a4ee3d5d9b17da5038c5486 /gcc-4.8/gcc/testsuite/gcc.dg/vect
parente85b9ca2afe8edbb9fa99c6ce2cc4e52dce18c21 (diff)
downloadtoolchain_gcc-32fce3edda831e36ee484406c39dffbe0230f257.tar.gz
toolchain_gcc-32fce3edda831e36ee484406c39dffbe0230f257.tar.bz2
toolchain_gcc-32fce3edda831e36ee484406c39dffbe0230f257.zip
[4.8] Merge GCC 4.8.1
Change-Id: Ic8a60b7563f5172440fd40788605163a0cca6e30
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.dg/vect')
-rw-r--r--gcc-4.8/gcc/testsuite/gcc.dg/vect/pr56918.c31
-rw-r--r--gcc-4.8/gcc/testsuite/gcc.dg/vect/pr56920.c21
2 files changed, 52 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.dg/vect/pr56918.c b/gcc-4.8/gcc/testsuite/gcc.dg/vect/pr56918.c
new file mode 100644
index 000000000..581faa0e2
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gcc.dg/vect/pr56918.c
@@ -0,0 +1,31 @@
+/* PR tree-optimization/56918 */
+/* { dg-additional-options "-O3" } */
+
+#include "tree-vect.h"
+
+extern void abort (void);
+double data[8];
+
+__attribute__((noinline, noclone)) void
+foo ()
+{
+ int i;
+ for (i = 0; i < 8; ++i)
+ data[i] = ((i + 2) % 3) + 1;
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ foo ();
+ if (data[0] != 3 || data[7] != 1)
+ abort ();
+ for (i = 1; i < 4; ++i)
+ if (data[i] != i || data[i + 3] != i)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc-4.8/gcc/testsuite/gcc.dg/vect/pr56920.c b/gcc-4.8/gcc/testsuite/gcc.dg/vect/pr56920.c
new file mode 100644
index 000000000..c6c7cca0f
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gcc.dg/vect/pr56920.c
@@ -0,0 +1,21 @@
+/* PR tree-optimization/56920 */
+/* { dg-additional-options "-O3" } */
+
+#include "tree-vect.h"
+
+extern void abort (void);
+
+int
+main ()
+{
+ unsigned int a[15], i;
+ check_vect ();
+ for (i = 0; i < 15; ++i)
+ a[i] = (i * 2) % 15;
+ for (i = 0; i < 15; ++i)
+ if (a[i] != (i * 2) % 15)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */