summaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-17 08:59:18 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-17 08:59:18 +0000
commit2b0f5dc8f2e342baf85ce60c0c892a253e13a7cc (patch)
tree4d12c3621f6819c0a2fec91c14203306dff887f7 /gcc/fortran/decl.c
parentfb81bb28b759a0ee1f538ab0ef020a9ef39ae879 (diff)
downloadgcc-2b0f5dc8f2e342baf85ce60c0c892a253e13a7cc.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189562 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index c3644b6d8f8..9bd3dc3a688 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);