summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-26 12:48:37 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-26 12:48:37 +0000
commit05eda0e76f321e8b27e8c31981837eeaa3cd0995 (patch)
treebbc03f60f0471b2b675fc2b8ead60f6ec5196090 /gcc/testsuite
parent7623e8793633b9a7af310d7120fa01777414cb4f (diff)
downloadgcc-05eda0e76f321e8b27e8c31981837eeaa3cd0995.tar.gz
2010-07-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45071 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Always adjust op->opcode. * gcc.dg/pr45071.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162534 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr45071.c34
2 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b9de6e42ae4..f1fde6887e5 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-26 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/45071
+ * gcc.dg/pr45071.c: New testcase.
+
2010-07-26 Tobias Burnus <burnus@net-b.de>
PR fortran/45066
diff --git a/gcc/testsuite/gcc.dg/pr45071.c b/gcc/testsuite/gcc.dg/pr45071.c
new file mode 100644
index 00000000000..d1715db1b73
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr45071.c
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-vrp -ftree-vectorize" } */
+
+struct A
+{
+ int i;
+};
+
+struct B
+{
+ struct A a;
+};
+
+extern void f4 (void *);
+
+inline void
+f3 (struct A *a)
+{
+ f4 (a);
+ while (a->i);
+}
+
+static inline void
+f2 (struct B *b)
+{
+ f3 (&b->a);
+}
+
+void
+f1 ()
+{
+ struct B *b = 0;
+ f2 (b);
+}