summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/cleanup1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/init/cleanup1.C')
-rw-r--r--gcc/testsuite/g++.dg/init/cleanup1.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/init/cleanup1.C b/gcc/testsuite/g++.dg/init/cleanup1.C
new file mode 100644
index 000000000..517af15c6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/cleanup1.C
@@ -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())
+ ;
+}