]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/28121 (verify_flow_info failed (wrong amount of branch edges...
authorZdenek Dvorak <dvorakz@suse.cz>
Thu, 22 Jun 2006 17:54:45 +0000 (19:54 +0200)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Thu, 22 Jun 2006 17:54:45 +0000 (17:54 +0000)
PR rtl-optimization/28121
* cfgexpand.c (tree_expand_cfg): Clean EDGE_EXECUTABLE flag from
the entry edge.

* gcc.dg/pr28121.c: New test.

From-SVN: r114898

gcc/ChangeLog
gcc/cfgexpand.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr28121.c [new file with mode: 0644]

index 7880d15fe9159ee402989cd29c49ac8082fc0403..0ab503814846e2e5aa17eb577ae759f50154e2ee 100644 (file)
@@ -1,3 +1,9 @@
+2006-06-22  Zdenek Dvorak <dvorakz@suse.cz>
+
+       PR rtl-optimization/28121
+       * cfgexpand.c (tree_expand_cfg): Clean EDGE_EXECUTABLE flag from
+       the entry edge.
+
 2006-06-21  DJ Delorie  <dj@redhat.com>
 
        * config/m32c/muldiv.md (mulhisi3_i): Only use registers for dest
index 941cdad86810a0c262392fd10a960b5f1958999d..1f43a32d77e9811d52f47c2c228612d61fffdd9f 100644 (file)
@@ -1580,6 +1580,8 @@ tree_expand_cfg (void)
 {
   basic_block bb, init_block;
   sbitmap blocks;
+  edge_iterator ei;
+  edge e;
 
   /* Some backends want to know that we are expanding to RTL.  */
   currently_expanding_to_rtl = 1;
@@ -1623,6 +1625,11 @@ tree_expand_cfg (void)
 
   init_block = construct_init_block ();
 
+  /* Clear EDGE_EXECUTABLE on the entry edge(s).  It is cleaned from the
+     remainining edges in expand_gimple_basic_block.  */
+  FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
+    e->flags &= ~EDGE_EXECUTABLE;
+
   FOR_BB_BETWEEN (bb, init_block->next_bb, EXIT_BLOCK_PTR, next_bb)
     bb = expand_gimple_basic_block (bb);
 
index 1bab6ae1ffd14e59b4ca73d87023b494d2732627..9fd22ded9224e6feb9a499a0785eb4483ed4f57e 100644 (file)
@@ -1,3 +1,8 @@
+2006-06-22  Zdenek Dvorak <dvorakz@suse.cz>
+
+       PR rtl-optimization/28121
+       * gcc.dg/pr28121.c: New test.
+
 2006-06-22  Lee Millward  <lee.millward@gmail.com>
 
        PR c++/27805
@@ -34,7 +39,6 @@
 2006-06-20  Steven G. Kargl  <kargls@comcast.net>
 
        * gfortran.dg/rrspacing_1.f90: New test.
 
 2006-06-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
diff --git a/gcc/testsuite/gcc.dg/pr28121.c b/gcc/testsuite/gcc.dg/pr28121.c
new file mode 100644 (file)
index 0000000..5cbf8f8
--- /dev/null
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+short
+GetCmd ()
+{
+  int c, c1;
+  for (c = 255; c == 255;)
+    {
+      c = GetMouseButton ();
+      if (c >= 0)
+       {
+         c = ParsePos (c, -1, 0);
+         c1 = ParsePos (c1, c, 1);
+         if (c == c1 && (c >= 0 || c == -10))
+           {
+             return c;
+           }
+         if (c >= 0 && c1 == -12)
+           {
+             return ((((((10) + 1) + 1)) + 1) << 7) | c;
+           }
+         c = 255;
+       }
+    }
+}
+