From 502af4917687e59654128c9eb717b56b88df459e Mon Sep 17 00:00:00 2001 From: Po-Chun Chang Date: Mon, 29 Jul 2013 13:08:03 -0600 Subject: match.c (gfc_match_call): Exit loop after setting i. * match.c (gfc_match_call): Exit loop after setting i. * resolve.c (resolve_variable): Exit loop after setting seen. * expr.c (gfc_check_pointer_assign): Exit loop after setting * warn. * trans-array.c (set_loop_bounds): Exit loop after setting nonoptional_arr. * trans-io.c (gfc_trans_transfer): Exit loop after setting * seen_vector. From-SVN: r201316 --- gcc/fortran/ChangeLog | 13 +++++++++++++ gcc/fortran/expr.c | 5 ++++- gcc/fortran/match.c | 5 ++++- gcc/fortran/resolve.c | 5 ++++- gcc/fortran/trans-array.c | 5 ++++- gcc/fortran/trans-io.c | 5 ++++- 6 files changed, 33 insertions(+), 5 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8ec11b6..0d9788d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,16 @@ +2013-07-22 Po Chang + + * match.c (gfc_match_call): Exit loop after setting i. + + * resolve.c (resolve_variable): Exit loop after setting seen. + + * expr.c (gfc_check_pointer_assign): Exit loop after setting warn. + + * trans-array.c (set_loop_bounds): Exit loop after setting + nonoptional_arr. + + * trans-io.c (gfc_trans_transfer): Exit loop after setting seen_vector. + 2013-07-28 Thomas Koenig PR fortran/58009 diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index c00fbc5..61f0f82 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3764,7 +3764,10 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) ns && ns->proc_name && ns->proc_name->attr.flavor != FL_PROCEDURE; ns = ns->parent) if (ns->parent == lvalue->symtree->n.sym->ns) - warn = true; + { + warn = true; + break; + } if (warn) gfc_warning ("Pointer at %L in pointer assignment might outlive the " diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 7f30156..29ac77e 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -4188,7 +4188,10 @@ gfc_match_call (void) i = 0; for (a = arglist; a; a = a->next) if (a->expr == NULL) - i = 1; + { + i = 1; + break; + } if (i) { diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index c348788..90b7c0a 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -4908,7 +4908,10 @@ resolve_variable (gfc_expr *e) for (formal = entry->sym->formal; formal; formal = formal->next) { if (formal->sym && sym->name == formal->sym->name) - seen = true; + { + seen = true; + break; + } } /* If it has not been seen as a dummy, this is an error. */ diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index c269ea8..1a2e508 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -4456,7 +4456,10 @@ set_loop_bounds (gfc_loopinfo *loop) for (ss = loop->ss; ss != gfc_ss_terminator; ss = ss->loop_chain) if (ss->info->type != GFC_SS_SCALAR && ss->info->type != GFC_SS_TEMP && ss->info->type != GFC_SS_REFERENCE && !ss->info->can_be_null_ref) - nonoptional_arr = true; + { + nonoptional_arr = true; + break; + } /* We use one SS term, and use that to determine the bounds of the loop for this dimension. We try to pick the simplest term. */ diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c index d60d15f..ec17dc9 100644 --- a/gcc/fortran/trans-io.c +++ b/gcc/fortran/trans-io.c @@ -2260,7 +2260,10 @@ gfc_trans_transfer (gfc_code * code) { for (n = 0; n < ref->u.ar.dimen; n++) if (ref->u.ar.dimen_type[n] == DIMEN_VECTOR) - seen_vector = true; + { + seen_vector = true; + break; + } } if (seen_vector && last_dt == READ) -- cgit v1.1