]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/19952 (ICE: tree check: expected class 'declaration', have...
authorDevang Patel <dpatel@apple.com>
Wed, 23 Feb 2005 01:10:39 +0000 (17:10 -0800)
committerDevang Patel <dpatel@gcc.gnu.org>
Wed, 23 Feb 2005 01:10:39 +0000 (17:10 -0800)
       PR 19952
       * tree-if-conv.c (process_phi_nodes): Use bsi_after_labels and skip
       all labels
       * g++.dg/tree-ssa/pr19952.C: New test.

From-SVN: r95430

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

index 832c0edf2f20f02510c43df182a97890dec5b9d5..68199d0396f351725134df1c33518927e93b9b7c 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 86857d2aa207ba1f49c93f0587a172322ae8589a..1a64436cebb748deea57d1fc6d72be1147f63442 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 73fba3fb499710ece41fd64d929663c54f1cf866..52bcfba69fbb569b58c8458626a81fd49254b8d4 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.  */
This page took 0.115161 seconds and 5 git commands to generate.