OSDN Git Service

2006-01-23 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Jan 2006 15:19:29 +0000 (15:19 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Jan 2006 15:19:29 +0000 (15:19 +0000)
            Daniel Berlin  <dberlin@dberlin.org>

        PR tree-opt/25315
        PR tree-opt/25857
        * tree-ssa-pre.c (insert_extra_phis): If an incomming edge is abnormal
        return from the function.

2006-01-23  Andrew Pinski  <pinskia@physics.uc.edu>

        PR tree-opt/25857
        * g++.dg/opt/pr25857.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110127 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr25857.C [new file with mode: 0644]
gcc/tree-ssa-pre.c

index eaaf2d8..2a85326 100644 (file)
@@ -1,3 +1,11 @@
+2006-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
+            Daniel Berlin  <dberlin@dberlin.org>
+
+       PR tree-opt/25315
+       PR tree-opt/25857
+       * tree-ssa-pre.c (insert_extra_phis): If an incomming edge is abnormal 
+       return from the function.
+
 2006-01-22  Zack Weinberg  <zackw@panix.com>
 
        * rtl.def (match_code): Add second argument.
index eb289c6..461ad4c 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR tree-opt/25857
+       * g++.dg/opt/pr25857.C: New test.
+
 2006-01-23  Steven Bosscher  <stevenb.gcc@gmail.com>
        Jan Hubicka  <jh@suse.cz>
        Richard Guenther  <rguenther@suse.de>
diff --git a/gcc/testsuite/g++.dg/opt/pr25857.C b/gcc/testsuite/g++.dg/opt/pr25857.C
new file mode 100644 (file)
index 0000000..4e6858f
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int foo();
+int i;
+
+struct A
+{
+  ~A() { if (this != (A*)(&i)) foo(); }
+};
+
+struct B
+{
+  A a1, a2, a3, a4;
+  ~B() { foo(); }
+};
+
+B b;
index ada654b..a695e90 100644 (file)
@@ -2745,6 +2745,10 @@ insert_extra_phis (basic_block block, basic_block dom)
 
       FOR_EACH_EDGE (e, ei, block->preds)
        {
+         /* We cannot handle abnormal incomming edges correctly.  */
+         if (e->flags & EDGE_ABNORMAL)
+           return;
+
          if (first)
            {
              bitmap_set_copy (tempset, AVAIL_OUT (e->src));