diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2003-11-14 03:17:33 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2003-11-14 03:17:33 -0500 |
commit | 53ee1bf364053cbd75a451f449288caff1792a27 (patch) | |
tree | 09e0572e8fdb62b466ba00ee73d68cae3af6c9bb /gcc | |
parent | 936471542f17e27767496e2225d8b05be23b96d8 (diff) | |
download | gcc-53ee1bf364053cbd75a451f449288caff1792a27.zip gcc-53ee1bf364053cbd75a451f449288caff1792a27.tar.gz gcc-53ee1bf364053cbd75a451f449288caff1792a27.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.dg/init/cleanup1.C | 16 |
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 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()) + ; +} |