diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-16 20:13:07 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-16 20:13:07 +0000 |
commit | 045f0656692c557b58aa639fef96adc70ae1180d (patch) | |
tree | 28595a498cea666dc9365125cb358fc6b2ed65e7 /gcc/c-semantics.c | |
parent | 1cbd4e96fc496437c7d4eb0833ab151ce6d9e2bf (diff) | |
download | ppe42-gcc-045f0656692c557b58aa639fef96adc70ae1180d.tar.gz ppe42-gcc-045f0656692c557b58aa639fef96adc70ae1180d.zip |
.:
PR c++/7640
* c-semantics.c (genrtl_do_stmt): Cope with NULL cond.
testsuite:
* g++.dg/other/do1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57212 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-semantics.c')
-rw-r--r-- | gcc/c-semantics.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c index 35cb559e6f8..a4d11f8e606 100644 --- a/gcc/c-semantics.c +++ b/gcc/c-semantics.c @@ -447,8 +447,9 @@ genrtl_do_stmt (t) /* Recognize the common special-case of do { ... } while (0) and do not emit the loop widgetry in this case. In particular this avoids cluttering the rtl with dummy loop notes, which can affect - alignment of adjacent labels. */ - if (integer_zerop (cond)) + alignment of adjacent labels. COND can be NULL due to parse + errors. */ + if (!cond || integer_zerop (cond)) { expand_start_null_loop (); expand_stmt (DO_BODY (t)); |