summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr50014.c
diff options
context:
space:
mode:
authorirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-09 06:02:00 +0000
committerirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-09 06:02:00 +0000
commitd42d0fe015c87d34d7d82831e518cdaf2bb10b52 (patch)
tree417132f64ec3fbca165b1cbb0855b5243a51f449 /gcc/testsuite/gcc.dg/vect/pr50014.c
parent595a24e0c7d4eade53cd426c0e38dad1f1e7f9df (diff)
downloadgcc-d42d0fe015c87d34d7d82831e518cdaf2bb10b52.tar.gz
PR tree-optimization/50014
* tree-vect-loop.c (vectorizable_reduction): Get def type before calling vect_get_vec_def_for_stmt_copy (). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177581 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/vect/pr50014.c')
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr50014.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/pr50014.c b/gcc/testsuite/gcc.dg/vect/pr50014.c
new file mode 100644
index 00000000000..c04ffec2135
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr50014.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+int f(unsigned char *s, int n)
+{
+ int sum = 0;
+ int i;
+
+ for (i = 0; i < n; i++)
+ sum += 256 * s[i];
+
+ return sum;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
+