This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] New test for PR 14553


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); }



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]