diff options
author | Tobias Burnus <burnus@gcc.gnu.org> | 2012-09-03 08:35:59 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-09-03 08:35:59 +0200 |
commit | 8e54f1392c4e7d310e0e9b4180ba8072ed95f072 (patch) | |
tree | 97423c845762747c432e4c5bc7446781847242d7 /gcc/fortran/module.c | |
parent | 2e4a4bbd9816cace5ee9f7939428ba2410e67efd (diff) | |
download | gcc-8e54f1392c4e7d310e0e9b4180ba8072ed95f072.zip gcc-8e54f1392c4e7d310e0e9b4180ba8072ed95f072.tar.gz gcc-8e54f1392c4e7d310e0e9b4180ba8072ed95f072.tar.bz2 |
[multiple changes]
2012-09-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* gfortran.h (symbol_attribute): Add artificial.
* module.c (mio_symbol_attribute): Handle attr.artificial
* class.c (gfc_build_class_symbol): Defer creation of the vtab
if the DT has finalizers, mark generated symbols as
attr.artificial.
(has_finalizer_component, finalize_component,
finalization_scalarizer, generate_finalization_wrapper):
New static functions.
(gfc_find_derived_vtab): Add _final component and call
generate_finalization_wrapper.
* dump-parse-tree.c (show_f2k_derived): Use resolved
proc_tree->n.sym rather than unresolved proc_sym.
(show_attr): Handle attr.artificial.
* resolve.c (gfc_resolve_finalizers): Ensure that the vtab
* exists.
(resolve_fl_derived): Resolve finalizers before
generating the vtab.
(resolve_symbol): Also allow assumed-rank arrays with CONTIGUOUS;
skip artificial symbols.
(resolve_fl_derived0): Skip artificial symbols.
2012-09-03 Tobias Burnus <burnus@net-b.de>
PR fortran/51632
* gfortran.dg/coarray_class_1.f90: New.
From-SVN: r190869
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index bfd8b01..5cfc335 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -1844,13 +1844,14 @@ typedef enum 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_CLASS_POINTER, - AB_IMPLICIT_PURE + AB_IMPLICIT_PURE, AB_ARTIFICIAL } ab_attribute; static const mstring attr_bits[] = { minit ("ALLOCATABLE", AB_ALLOCATABLE), + minit ("ARTIFICIAL", AB_ARTIFICIAL), minit ("ASYNCHRONOUS", AB_ASYNCHRONOUS), minit ("DIMENSION", AB_DIMENSION), minit ("CODIMENSION", AB_CODIMENSION), @@ -1975,6 +1976,8 @@ mio_symbol_attribute (symbol_attribute *attr) { if (attr->allocatable) MIO_NAME (ab_attribute) (AB_ALLOCATABLE, attr_bits); + if (attr->artificial) + MIO_NAME (ab_attribute) (AB_ARTIFICIAL, attr_bits); if (attr->asynchronous) MIO_NAME (ab_attribute) (AB_ASYNCHRONOUS, attr_bits); if (attr->dimension) @@ -2090,6 +2093,9 @@ mio_symbol_attribute (symbol_attribute *attr) case AB_ALLOCATABLE: attr->allocatable = 1; break; + case AB_ARTIFICIAL: + attr->artificial = 1; + break; case AB_ASYNCHRONOUS: attr->asynchronous = 1; break; |