diff options
author | Tobias Burnus <burnus@net-b.de> | 2014-10-10 08:00:26 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2014-10-10 08:00:26 +0200 |
commit | a6c631732fc35dc6948e7a1810b78eef3a11af97 (patch) | |
tree | 5afdf90c58115030af219c47b0a8c549eb3748ea /gcc/fortran/symbol.c | |
parent | 548cb3d77c81104778f4cbc4d97410cb31a64971 (diff) | |
download | gcc-a6c631732fc35dc6948e7a1810b78eef3a11af97.zip gcc-a6c631732fc35dc6948e7a1810b78eef3a11af97.tar.gz gcc-a6c631732fc35dc6948e7a1810b78eef3a11af97.tar.bz2 |
gfortran.h (gfc_set_implicit_none): Update prototype.
2014-10-10 Tobias Burnus <burnus@net-b.de>
gcc/fortran/
* gfortran.h (gfc_set_implicit_none): Update prototype.
* symbol.c (gfc_set_implicit_none): Take and
use error location. Move diagnostic from here to ...
* decl.c (gfc_match_implicit_none): ... here. And
update call. Handle empty implicit-none-spec.
(gfc_match_implicit): Handle statement-separator ";".
gcc/testsuite/
* gfortran.dg/implicit_16.f90: New.
From-SVN: r216057
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r-- | gcc/fortran/symbol.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 0ccbd1f..3eb58f4 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -114,17 +114,10 @@ static int new_flag[GFC_LETTERS]; /* Handle a correctly parsed IMPLICIT NONE. */ void -gfc_set_implicit_none (bool type, bool external) +gfc_set_implicit_none (bool type, bool external, locus *loc) { int i; - if (gfc_current_ns->seen_implicit_none - || gfc_current_ns->has_implicit_none_export) - { - gfc_error_now ("Duplicate IMPLICIT NONE statement at %C"); - return; - } - if (external) gfc_current_ns->has_implicit_none_export = 1; @@ -135,8 +128,8 @@ gfc_set_implicit_none (bool type, bool external) { if (gfc_current_ns->set_flag[i]) { - gfc_error_now ("IMPLICIT NONE (type) statement at %C following an " - "IMPLICIT statement"); + gfc_error_now ("IMPLICIT NONE (type) statement at %L following an " + "IMPLICIT statement", loc); return; } gfc_clear_ts (&gfc_current_ns->default_type[i]); |