aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chun Chang <pchang9@cs.wisc.edu>2013-07-29 13:08:03 -0600
committerJeff Law <law@gcc.gnu.org>2013-07-29 13:08:03 -0600
commit502af4917687e59654128c9eb717b56b88df459e (patch)
tree9a885c00c0e07ac5ea80df8ee6cf955ea84a0512
parent272827e446d889b671f76f5b8aa763c0b82384ad (diff)
downloadgcc-502af4917687e59654128c9eb717b56b88df459e.zip
gcc-502af4917687e59654128c9eb717b56b88df459e.tar.gz
gcc-502af4917687e59654128c9eb717b56b88df459e.tar.bz2
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
-rw-r--r--gcc/fortran/ChangeLog13
-rw-r--r--gcc/fortran/expr.c5
-rw-r--r--gcc/fortran/match.c5
-rw-r--r--gcc/fortran/resolve.c5
-rw-r--r--gcc/fortran/trans-array.c5
-rw-r--r--gcc/fortran/trans-io.c5
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 <pchang9@cs.wisc.edu>
+
+ * 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 <tkoenig@gcc.gnu.org>
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)