summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/20040313-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/20040313-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20040313-1.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040313-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040313-1.c
new file mode 100644
index 00000000000..0ad144c03dd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20040313-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+/* Test provided by Volker Reichelt in PR 14553. The redundant PHI
+ node elimination pass was not using the right API functions to
+ propagate pointers, which resulted in dereferenced pointers that
+ did not have memory tags associated with them. */
+
+void foo(int* p)
+{
+ int i;
+ for (i=1; i>0; --i, ++p)
+ *p=0;
+}
+
+void bar(int* p) { foo(p); }