re PR c++/13033 ([tree-ssa] ICE in lower_stmt)
authorJason Merrill <jason@gcc.gnu.org>
Fri, 14 Nov 2003 08:17:33 +0000 (03:17 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 14 Nov 2003 08:17:33 +0000 (03:17 -0500)
        PR c++/13033
        * c-simplify.c (gimplify_c_loop): Wrap the increment in a
        CLEANUP_POINT_EXPR.

From-SVN: r73587

gcc/testsuite/g++.dg/init/cleanup1.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/init/cleanup1.C b/gcc/testsuite/g++.dg/init/cleanup1.C
new file mode 100644 (file)
index 0000000..517af15
--- /dev/null
@@ -0,0 +1,16 @@
+// PR c++/13033
+
+// We failed to treat the for increment expression as a full-expression,
+// which broke gimplification.
+
+struct QDomNode {
+  virtual ~QDomNode();
+  QDomNode nextSibling() const;
+  bool isNull() const;
+};
+
+void processNode(QDomNode n)
+{
+  for (; !n.isNull(); n = n.nextSibling())
+    ;
+}