This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] New test for PR 14553
- From: Diego Novillo <dnovillo at redhat dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 13 Mar 2004 10:23:31 -0500
- Subject: [tree-ssa] New test for PR 14553
- Organization: Red Hat Canada
Extracted from the PR
PR optimization/14553
* gcc.dg/tree-ssa/20040313-1.c: New test.
Index: gcc.dg/tree-ssa/20040313-1.c
===================================================================
RCS file: gcc.dg/tree-ssa/20040313-1.c
diff -N gcc.dg/tree-ssa/20040313-1.c
*** /dev/null 1 Jan 1970 00:00:00 -0000
--- gcc.dg/tree-ssa/20040313-1.c 13 Mar 2004 15:20:12 -0000
***************
*** 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); }