This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Index: gcc/fortran/module.c
===================================================================
--- gcc/fortran/module.c (revision 127586)
+++ gcc/fortran/module.c (working copy)
@@ -599,6 +599,7 @@ gfc_match_use (void)
switch (type)
{
case INTERFACE_NAMELESS:
+ case INTERFACE_ABSTRACT:
gfc_error ("Missing generic specification in USE statement at %C");
goto cleanup;
Index: gcc/fortran/parse.c =================================================================== --- gcc/fortran/parse.c (revision 127586) +++ gcc/fortran/parse.c (working copy) @@ -172,6 +172,7 @@ decode_statement (void) switch (c) { case 'a': + match ("abstract interface", gfc_match_abstract_interface, ST_INTERFACE); match ("allocate", gfc_match_allocate, ST_ALLOCATE); match ("allocatable", gfc_match_allocatable, ST_ATTR_DECL); match ("assign", gfc_match_assign, ST_LABEL_ASSIGNMENT);
@@ -1795,6 +1796,18 @@ loop:
}
}
+ if (current_interface.type == INTERFACE_ABSTRACT)
+ {
+ gfc_new_block->attr.abstract = 1;
+ if (!strcmp(gfc_new_block->name,"integer")
+ || !strcmp(gfc_new_block->name,"real")
+ || !strcmp(gfc_new_block->name,"complex")
+ || !strcmp(gfc_new_block->name,"character")
+ || !strcmp(gfc_new_block->name,"logical"))
+ gfc_error ("Name of ABSTRACT INTERFACE at %C cannot be the same as "
+ "an intrinsic type: %s",gfc_new_block->name);
+ }
+
Thanks, - Tobi
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |