summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-02 11:47:12 +0000
committerirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-02 11:47:12 +0000
commit1bc5f74fd61853debb9ed9e5f098e9bd12453dc4 (patch)
tree192198bbf94e4e391a0d0d68c4409f9a811678b5 /gcc/testsuite
parentde9f96f2397d28b640d2b457a715ecec4e658556 (diff)
downloadgcc-1bc5f74fd61853debb9ed9e5f098e9bd12453dc4.tar.gz
PR tree-optimization/46663
* tree-vect-patterns.c (vect_recog_pow_pattern): Check that FUNCTION_DECL exists and that it's a builtin. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167366 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr46663.c14
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d70e0b19953..e0ca3527c1d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-02 Richard Guenther <rguenther@suse.de>
+ Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/46663
+ * gcc.dg/vect/pr46663.c: New test.
+
2010-12-02 Jie Zhang <jie@codesourcery.com>
PR middle-end/46674
diff --git a/gcc/testsuite/gcc.dg/vect/pr46663.c b/gcc/testsuite/gcc.dg/vect/pr46663.c
new file mode 100644
index 00000000000..42a1ffbbc4b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr46663.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-vectorize -fdump-tree-vect-details -fexceptions" } */
+
+typedef __attribute__ ((const)) int (*bart) (void);
+
+int foo (bart bar, int m)
+{
+ int i, j = 0;
+ for (i = 0; i < m; i++)
+ j += bar();
+ return j;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */