From: jason Date: Fri, 14 Nov 2003 08:17:33 +0000 (+0000) Subject: PR c++/13033 X-Git-Tag: upstream/4.9.2~75336 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae7a11b6666ddddd6e7c6a3fee3aa369c7d66b91;p=platform%2Fupstream%2Flinaro-gcc.git PR c++/13033 * c-simplify.c (gimplify_c_loop): Wrap the increment in a CLEANUP_POINT_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73587 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/g++.dg/init/cleanup1.C b/gcc/testsuite/g++.dg/init/cleanup1.C new file mode 100644 index 0000000..517af15 --- /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()) + ; +}