Summary: | [OOP] Bogus argument checking for generated _def_init parameter and _copy procedure with CAF | ||
---|---|---|---|
Product: | gcc | Reporter: | Tobias Burnus <burnus> |
Component: | fortran | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | janus |
Priority: | P3 | Keywords: | rejects-valid |
Version: | 4.7.0 | ||
Target Milestone: | 4.8.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | 4.6.3, 4.7.0 | Last reconfirmed: | 2015-10-20 00:00:00 |
Bug Depends on: | |||
Bug Blocks: | 52403 |
Description
Tobias Burnus
2011-12-20 07:50:49 UTC
Patch for the _def_init issue: --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -11492,6 +11492,7 @@ resolve_fl_derived0 (gfc_symbol *sym) /* F2008, C444. */ if (c->ts.type == BT_DERIVED && c->ts.u.derived->attr.coarray_comp + && !sym->attr.vtype && (c->attr.codimension || c->attr.pointer || c->attr.dimension || c->attr.allocatable)) { Author: burnus Date: Mon Sep 3 06:35:59 2012 New Revision: 190869 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190869 Log: 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. Added: trunk/gcc/testsuite/gfortran.dg/coarray_class_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/class.c trunk/gcc/fortran/dump-parse-tree.c trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/module.c trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog Fixed by introducing the "artificial" attribute. TODO: Check that this patch doesn't worsen the handling of (non)polymorphic coarray components of a polymorphic variable are properly handled for DEALLOCATE/ALLOCATE/intrinsic assignment. > Fixed by introducing the "artificial" attribute. > > TODO: Check that this patch doesn't worsen the handling of (non)polymorphic > coarray components of a polymorphic variable are properly handled for > DEALLOCATE/ALLOCATE/intrinsic assignment. Any hint about how to do that? > > TODO: Check that this patch doesn't worsen the handling of (non)polymorphic > > coarray components of a polymorphic variable are properly handled for > > DEALLOCATE/ALLOCATE/intrinsic assignment. > > Any hint about how to do that? No feedback, closing as FIXED. Please open new PR(s) with relevant information for remaining issue(s). |