summaryrefslogtreecommitdiff
path: root/gcc/c-semantics.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2002-09-16 20:13:07 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2002-09-16 20:13:07 +0000
commit85341ddd99c46d8fcc85c1cebc6902310c4f02a7 (patch)
tree28595a498cea666dc9365125cb358fc6b2ed65e7 /gcc/c-semantics.c
parent3ec83083bf1e0fa4a923a4aa1269375893afac7b (diff)
downloadgcc-85341ddd99c46d8fcc85c1cebc6902310c4f02a7.tar.gz
re PR c++/7640 (g++ 3.3 ICE: SEGV in integer_zerop)
.: PR c++/7640 * c-semantics.c (genrtl_do_stmt): Cope with NULL cond. testsuite: * g++.dg/other/do1.C: New test. From-SVN: r57212
Diffstat (limited to 'gcc/c-semantics.c')
-rw-r--r--gcc/c-semantics.c5
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));