aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@gcc.gnu.org>2007-08-18 16:57:21 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2007-08-18 16:57:21 +0200
commit9e1d712c405048f18f246c974865777971c8be16 (patch)
tree266c365803dbf632341bf1d130d28ed8df05998c /gcc/fortran/module.c
parenta595913e95d59f64670364c3dea31a4774c960f3 (diff)
downloadgcc-9e1d712c405048f18f246c974865777971c8be16.zip
gcc-9e1d712c405048f18f246c974865777971c8be16.tar.gz
gcc-9e1d712c405048f18f246c974865777971c8be16.tar.bz2
[multiple changes]
2007-08-18 Paul Thomas <pault@gcc.gnu.org> Janus Weil <jaydub66@gmail.com> * interface.c (gfc_match_interface,gfc_match_abstract_interface, gfc_match_end_interface,gfc_add_interface): Add abstract interface. * dump-parse-tree.c (gfc_show_attr): Ditto. * gfortran.h (interface_type,symbol_attribute): Ditto. * module.c (gfc_match_use,ab_attribute,attr_bits, mio_symbol_attribute): Ditto. * resolve.c (resolve_function): Ditto. * match.h: Ditto. * parse.c (decode_statement): Ditto. (parse_interface): Ditto, check for C1203 (name of abstract interface cannot be the same as an intrinsic type). * decl.c (gfc_match_bind_c): Check for NAME= with abstract interfaces. (access_attr_decl): Handle Abstract interfaces. 2007-08-17 Tobias Burnus <burnus@net-b.de> * gfortran.dg/interface_abstract_1.f90: New. From-SVN: r127612
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index c5a5184..2839386 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -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;
@@ -1519,7 +1520,7 @@ typedef enum
AB_ELEMENTAL, AB_PURE, AB_RECURSIVE, AB_GENERIC, AB_ALWAYS_EXPLICIT,
AB_CRAY_POINTER, AB_CRAY_POINTEE, AB_THREADPRIVATE, AB_ALLOC_COMP,
AB_POINTER_COMP, AB_PRIVATE_COMP, AB_VALUE, AB_VOLATILE, AB_PROTECTED,
- AB_IS_BIND_C, AB_IS_C_INTEROP, AB_IS_ISO_C
+ AB_IS_BIND_C, AB_IS_C_INTEROP, AB_IS_ISO_C, AB_ABSTRACT
}
ab_attribute;
@@ -1557,6 +1558,7 @@ static const mstring attr_bits[] =
minit ("POINTER_COMP", AB_POINTER_COMP),
minit ("PRIVATE_COMP", AB_PRIVATE_COMP),
minit ("PROTECTED", AB_PROTECTED),
+ minit ("ABSTRACT", AB_ABSTRACT),
minit (NULL, -1)
};
@@ -1639,6 +1641,8 @@ mio_symbol_attribute (symbol_attribute *attr)
MIO_NAME (ab_attribute) (AB_SUBROUTINE, attr_bits);
if (attr->generic)
MIO_NAME (ab_attribute) (AB_GENERIC, attr_bits);
+ if (attr->abstract)
+ MIO_NAME (ab_attribute) (AB_ABSTRACT, attr_bits);
if (attr->sequence)
MIO_NAME (ab_attribute) (AB_SEQUENCE, attr_bits);
@@ -1739,6 +1743,9 @@ mio_symbol_attribute (symbol_attribute *attr)
case AB_GENERIC:
attr->generic = 1;
break;
+ case AB_ABSTRACT:
+ attr->abstract = 1;
+ break;
case AB_SEQUENCE:
attr->sequence = 1;
break;