diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-10-28 17:57:12 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-10-28 17:57:12 +0100 |
commit | 57bf28eab7d3b708b52d4d3f52b0f42966945b8d (patch) | |
tree | c44e73e72c315e9062bb21c9d63b806af2cd111c /gcc/fortran/io.c | |
parent | 036e1775739f9449a055adae2cb262e17336f74d (diff) | |
download | gcc-57bf28eab7d3b708b52d4d3f52b0f42966945b8d.zip gcc-57bf28eab7d3b708b52d4d3f52b0f42966945b8d.tar.gz gcc-57bf28eab7d3b708b52d4d3f52b0f42966945b8d.tar.bz2 |
re PR fortran/54958 (Wrongly rejects ac-implied-DO variables which also occur with INTENT(IN))
2012-10-28 Tobias Burnus <burnus@net-b.de>
PR fortran/54958
* gfortran.h (gfc_resolve_iterator_expr,
gfc_check_vardef_context): Update prototype.
* expr.c (gfc_check_vardef_context): Add own_scope
argument and honour it.
* resolve.c (gfc_resolve_iterator_expr): Add own_scope
argument and honour it.
(resolve_deallocate_expr, resolve_allocate_expr,
resolve_data_variables, resolve_transfer
resolve_lock_unlock, resolve_code): Update calls.
* array.c (resolve_array_list): Ditto.
* check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
* interface.c (compare_actual_formal): Ditto.
* intrinsic.c (check_arglist): Ditto.
* io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire):
* Ditto.
2012-10-28 Tobias Burnus <burnus@net-b.de>
PR fortran/54958
* gfortran.dg/do_check_6.f90: New.
From-SVN: r192896
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r-- | gcc/fortran/io.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 447d03f..bd84f1f 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -1534,7 +1534,7 @@ resolve_tag (const io_tag *tag, gfc_expr *e) char context[64]; sprintf (context, _("%s tag"), tag->name); - if (gfc_check_vardef_context (e, false, false, context) == FAILURE) + if (gfc_check_vardef_context (e, false, false, false, context) == FAILURE) return FAILURE; } @@ -2867,7 +2867,7 @@ gfc_resolve_dt (gfc_dt *dt, locus *loc) /* If we are writing, make sure the internal unit can be changed. */ gcc_assert (k != M_PRINT); if (k == M_WRITE - && gfc_check_vardef_context (e, false, false, + && gfc_check_vardef_context (e, false, false, false, _("internal unit in WRITE")) == FAILURE) return FAILURE; } @@ -2897,7 +2897,7 @@ gfc_resolve_dt (gfc_dt *dt, locus *loc) gfc_try t; e = gfc_get_variable_expr (gfc_find_sym_in_symtree (n->sym)); - t = gfc_check_vardef_context (e, false, false, NULL); + t = gfc_check_vardef_context (e, false, false, false, NULL); gfc_free_expr (e); if (t == FAILURE) @@ -4063,7 +4063,8 @@ gfc_resolve_inquire (gfc_inquire *inquire) { \ char context[64]; \ sprintf (context, _("%s tag with INQUIRE"), (tag)->name); \ - if (gfc_check_vardef_context ((expr), false, false, context) == FAILURE) \ + if (gfc_check_vardef_context ((expr), false, false, false, \ + context) == FAILURE) \ return FAILURE; \ } INQUIRE_RESOLVE_TAG (&tag_iomsg, inquire->iomsg); |