diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2002-12-16 18:23:00 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2002-12-16 18:23:00 +0000 |
commit | 4977bab6ed59f01c73f9c8b9e92298706df9b6d5 (patch) | |
tree | c259697c448b0c6f548f153c48c46a8d7a75970f /gcc/c-semantics.c | |
parent | b51dc045004ee7eb8d2bf4358ddf22a6cc6c1d00 (diff) | |
download | gcc-4977bab6ed59f01c73f9c8b9e92298706df9b6d5.zip gcc-4977bab6ed59f01c73f9c8b9e92298706df9b6d5.tar.gz gcc-4977bab6ed59f01c73f9c8b9e92298706df9b6d5.tar.bz2 |
Merge basic-improvements-branch to trunk
From-SVN: r60174
Diffstat (limited to 'gcc/c-semantics.c')
-rw-r--r-- | gcc/c-semantics.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c index 994b462..0b8f587 100644 --- a/gcc/c-semantics.c +++ b/gcc/c-semantics.c @@ -23,6 +23,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "config.h" #include "system.h" +#include "coretypes.h" +#include "tm.h" #include "tree.h" #include "function.h" #include "splay-tree.h" @@ -455,6 +457,17 @@ genrtl_do_stmt (t) expand_stmt (DO_BODY (t)); expand_end_null_loop (); } + else if (integer_nonzerop (cond)) + { + emit_nop (); + emit_line_note (input_filename, lineno); + expand_start_loop (1); + + expand_stmt (DO_BODY (t)); + + emit_line_note (input_filename, lineno); + expand_end_loop (); + } else { emit_nop (); @@ -519,7 +532,10 @@ genrtl_for_stmt (t) /* Expand the initialization. */ emit_nop (); emit_line_note (input_filename, lineno); - expand_start_loop_continue_elsewhere (1); + if (FOR_EXPR (t)) + expand_start_loop_continue_elsewhere (1); + else + expand_start_loop (1); genrtl_do_pushlevel (); cond = expand_cond (FOR_COND (t)); @@ -541,9 +557,11 @@ genrtl_for_stmt (t) input_filename = saved_filename; lineno = saved_lineno; emit_line_note (input_filename, lineno); - expand_loop_continue_here (); if (FOR_EXPR (t)) - genrtl_expr_stmt (FOR_EXPR (t)); + { + expand_loop_continue_here (); + genrtl_expr_stmt (FOR_EXPR (t)); + } expand_end_loop (); } |