diff options
author | Janus Weil <janus@gcc.gnu.org> | 2010-07-11 09:55:11 +0200 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2010-07-11 09:55:11 +0200 |
commit | d40477b49fd716b39484746200db3ae99fef7230 (patch) | |
tree | 16cd0f7ef9f241752f876619444e0b2b144f087f /gcc/fortran/module.c | |
parent | 76986b412bae95c36f54fa5c13cf46a54dca2e30 (diff) | |
download | gcc-d40477b49fd716b39484746200db3ae99fef7230.zip gcc-d40477b49fd716b39484746200db3ae99fef7230.tar.gz gcc-d40477b49fd716b39484746200db3ae99fef7230.tar.bz2 |
re PR fortran/44869 ([OOP] generic TBPs not initialized properly)
2010-07-11 Janus Weil <janus@gcc.gnu.org>
PR fortran/44689
* decl.c (build_sym,attr_decl1): Only build the class container if the
symbol has sufficient attributes.
* expr.c (gfc_check_pointer_assign): Use class_pointer instead of
pointer attribute for classes.
* match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
* module.c (MOD_VERSION): Bump.
(enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
(mio_symbol_attribute): Handle class_pointer attribute.
* parse.c (parse_derived): Use class_pointer instead of pointer
attribute for classes.
* primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
* resolve.c (resolve_structure_cons,resolve_deallocate_expr,
resolve_allocate_expr,resolve_fl_derived): Ditto.
(resolve_fl_var_and_proc): Check for class_ok attribute.
2010-07-11 Janus Weil <janus@gcc.gnu.org>
PR fortran/44689
* gfortran.dg/class_24.f03: New.
From-SVN: r162052
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index b42a9e8..aa6e72e 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -80,7 +80,7 @@ along with GCC; see the file COPYING3. If not see /* Don't put any single quote (') in MOD_VERSION, if yout want it to be recognized. */ -#define MOD_VERSION "5" +#define MOD_VERSION "6" /* Structure that describes a position within a module file. */ @@ -1675,7 +1675,7 @@ typedef enum 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_ABSTRACT, AB_ZERO_COMP, AB_IS_CLASS, AB_PROCEDURE, AB_PROC_POINTER, AB_ASYNCHRONOUS, AB_CODIMENSION, - AB_COARRAY_COMP, AB_VTYPE, AB_VTAB, AB_CONTIGUOUS + AB_COARRAY_COMP, AB_VTYPE, AB_VTAB, AB_CONTIGUOUS, AB_CLASS_POINTER } ab_attribute; @@ -1724,6 +1724,7 @@ static const mstring attr_bits[] = minit ("PROC_POINTER", AB_PROC_POINTER), minit ("VTYPE", AB_VTYPE), minit ("VTAB", AB_VTAB), + minit ("CLASS_POINTER", AB_CLASS_POINTER), minit (NULL, -1) }; @@ -1818,6 +1819,8 @@ mio_symbol_attribute (symbol_attribute *attr) MIO_NAME (ab_attribute) (AB_OPTIONAL, attr_bits); if (attr->pointer) MIO_NAME (ab_attribute) (AB_POINTER, attr_bits); + if (attr->class_pointer) + MIO_NAME (ab_attribute) (AB_CLASS_POINTER, attr_bits); if (attr->is_protected) MIO_NAME (ab_attribute) (AB_PROTECTED, attr_bits); if (attr->value) @@ -1933,6 +1936,9 @@ mio_symbol_attribute (symbol_attribute *attr) case AB_POINTER: attr->pointer = 1; break; + case AB_CLASS_POINTER: + attr->class_pointer = 1; + break; case AB_PROTECTED: attr->is_protected = 1; break; |