From 53ee1bf364053cbd75a451f449288caff1792a27 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 14 Nov 2003 03:17:33 -0500 Subject: [PATCH] re PR c++/13033 ([tree-ssa] ICE in lower_stmt) 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 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gcc/testsuite/g++.dg/init/cleanup1.C diff --git a/gcc/testsuite/g++.dg/init/cleanup1.C b/gcc/testsuite/g++.dg/init/cleanup1.C new file mode 100644 index 00000000000..517af15c673 --- /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()) + ; +} -- 2.30.2