diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-07-17 10:59:18 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-07-17 10:59:18 +0200 |
commit | a6fcd41adad8ad955a26694e20e50bcfa4b7e72e (patch) | |
tree | 4d12c3621f6819c0a2fec91c14203306dff887f7 /gcc/fortran/decl.c | |
parent | b663bdabd2cbaa608b78f1861e8fc8e38d94341b (diff) | |
download | gcc-a6fcd41adad8ad955a26694e20e50bcfa4b7e72e.zip gcc-a6fcd41adad8ad955a26694e20e50bcfa4b7e72e.tar.gz gcc-a6fcd41adad8ad955a26694e20e50bcfa4b7e72e.tar.bz2 |
re PR fortran/49265 (Double colon in procedure-stmt (generic interface))
2012-07-17 Tobias Burnus <burnus@net-b.de>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/49265
* decl.c (match_procedure_in_interface): Support "::" for
Fortran 2008 and later.
2012-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/49265
* gfortran.dg/module_procedure_double_colon_3.f90: New.
* gfortran.dg/module_procedure_double_colon_4.f90: New.
Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
From-SVN: r189562
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index c3644b6..9bd3dc3 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -5108,6 +5108,7 @@ match_procedure_in_interface (void) match m; gfc_symbol *sym; char name[GFC_MAX_SYMBOL_LEN + 1]; + locus old_locus; if (current_interface.type == INTERFACE_NAMELESS || current_interface.type == INTERFACE_ABSTRACT) @@ -5116,6 +5117,19 @@ match_procedure_in_interface (void) return MATCH_ERROR; } + /* Check if the F2008 optional double colon appears. */ + gfc_gobble_whitespace (); + old_locus = gfc_current_locus; + if (gfc_match ("::") == MATCH_YES) + { + if (gfc_notify_std (GFC_STD_F2008, "Fortran 2008: double colon in " + "MODULE PROCEDURE statement at %L", &old_locus) + == FAILURE) + return MATCH_ERROR; + } + else + gfc_current_locus = old_locus; + for(;;) { m = gfc_match_name (name); |