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



This is a test for a semi-latent bug in how the dominator optimizer
interacts with the mechanisms for deferring variable rewrites.

A patch for this bug will be installed shortly.

2003-10-22  Jeff Law  <law@redhat.com>

	* gcc.dg/tree-ssa/20031022-1.c: New test.



Index: gcc.dg/tree-ssa/20031022-1.c
===================================================================
RCS file: gcc.dg/tree-ssa/20031022-1.c
diff -N gcc.dg/tree-ssa/20031022-1.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- gcc.dg/tree-ssa/20031022-1.c	22 Oct 2003 19:02:40 -0000
***************
*** 0 ****
--- 1,27 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O1 -fdump-tree-dom1" } */
+  
+ typedef struct edge_def
+ {
+   int z;
+ } *edge;
+ typedef struct basic_block_def
+ {
+   edge pred;
+ } *basic_block;
+ extern struct basic_block_def entry_exit_blocks[2];
+ void
+ blah (int arf)
+ {
+   edge e;
+   e = (&entry_exit_blocks[1])->pred;
+   for ( ; ;)
+     if (arf)
+       break;
+   commit_edge_insertions ();
+   e = (&entry_exit_blocks[1])->pred;
+   foo (e);
+ }
+ 
+ /* There should be two loads from entry_exit_blocks[1].pred.  */
+ /* { dg-final { scan-tree-dump-times "entry_exit_blocks.1..pred" 2 "dom1"} } 
*/





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