aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/io.c5
-rw-r--r--gcc/fortran/resolve.c6
3 files changed, 11 insertions, 6 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 1036716..31353be 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-19 Tobias Burnus <burnus@net-b.>
+
+ PR fortran/60543
+ * io.c (check_io_constraints): Use gfc_unset_implicit_pure.
+ * resolve.c (resolve_ordinary_assign): Ditto.
+
2014-03-19 Tobias Burnus <burnus@net-b.de>
PR fortran/60543
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 8d3dc46..84d0db8 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -3259,9 +3259,8 @@ if (condition) \
"an internal file in a PURE procedure",
io_kind_name (k));
- if (gfc_implicit_pure (NULL) && (k == M_READ || k == M_WRITE))
- gfc_current_ns->proc_name->attr.implicit_pure = 0;
-
+ if (k == M_READ || k == M_WRITE)
+ gfc_unset_implicit_pure (NULL);
}
if (k != M_READ)
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index ac58167..6e23e57 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -9165,7 +9165,7 @@ resolve_ordinary_assign (gfc_code *code, gfc_namespace *ns)
if (lhs->expr_type == EXPR_VARIABLE
&& lhs->symtree->n.sym != gfc_current_ns->proc_name
&& lhs->symtree->n.sym->ns != gfc_current_ns)
- gfc_current_ns->proc_name->attr.implicit_pure = 0;
+ gfc_unset_implicit_pure (NULL);
if (lhs->ts.type == BT_DERIVED
&& lhs->expr_type == EXPR_VARIABLE
@@ -9173,11 +9173,11 @@ resolve_ordinary_assign (gfc_code *code, gfc_namespace *ns)
&& rhs->expr_type == EXPR_VARIABLE
&& (gfc_impure_variable (rhs->symtree->n.sym)
|| gfc_is_coindexed (rhs)))
- gfc_current_ns->proc_name->attr.implicit_pure = 0;
+ gfc_unset_implicit_pure (NULL);
/* Fortran 2008, C1283. */
if (gfc_is_coindexed (lhs))
- gfc_current_ns->proc_name->attr.implicit_pure = 0;
+ gfc_unset_implicit_pure (NULL);
}
/* F2008, 7.2.1.2. */