OSDN Git Service

PR 19952
authordpatel <dpatel@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Feb 2005 01:10:39 +0000 (01:10 +0000)
committerdpatel <dpatel@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Feb 2005 01:10:39 +0000 (01:10 +0000)
       * tree-if-conv.c (process_phi_nodes): Use bsi_after_labels and skip
       all labels
       * g++.dg/tree-ssa/pr19952.C: New test.

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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/pr19952.C [new file with mode: 0644]
gcc/tree-if-conv.c

index 832c0ed..68199d0 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-22  Devang Patel  <dpatel@apple.com>
+
+       PR 19952
+       * tree-if-conv.c (process_phi_nodes): Use bsi_after_labels and skip 
+       all labels
+       
 2005-02-22  David Edelsohn  <edelsohn@gnu.org>
 
        * config/rs6000/aix.h (WINT_TYPE): Define.
index 86857d2..1a64436 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-22  Devang Patel  <dpatel@apple.com>
+
+       PR 19952
+       * g++.dg/tree-ssa/pr19952.C: New test.
+       
 2005-02-22  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/19883
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr19952.C b/gcc/testsuite/g++.dg/tree-ssa/pr19952.C
new file mode 100644 (file)
index 0000000..92d669c
--- /dev/null
@@ -0,0 +1,24 @@
+/* PR 19952 */
+/* { dg-compile } */
+/* { dg-options "-ftree-vectorize -O2" } */
+
+int i;
+
+struct A
+{
+    ~A() { ++i; }
+};
+
+struct B
+{
+    A a;
+};
+
+void foo()
+{
+    for (int i=0; i<2; ++i)
+    {
+        B *p;
+        if (p) p->~B();
+    }
+}
index 73fba3f..52bcfba 100644 (file)
@@ -830,7 +830,7 @@ process_phi_nodes (struct loop *loop)
        continue;
 
       phi = phi_nodes (bb);
-      bsi = bsi_start (bb);
+      bsi = bsi_after_labels (bb);
 
       /* BB has two predecessors. Using predecessor's aux field, set
         appropriate condition for the PHI node replacement.  */