public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/51632] New: [OOP] Bogus argument checking for generated _def_init parameter and _copy procedure with CAF
@ 2011-12-20 8:03 burnus at gcc dot gnu.org
2011-12-20 8:04 ` [Bug fortran/51632] " burnus at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-12-20 8:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51632
Bug #: 51632
Summary: [OOP] Bogus argument checking for generated _def_init
parameter and _copy procedure with CAF
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
The following program is rejected with:
class(periodic_2nd_order), intent(in) :: this
1
Error: Component '_def_init' at (1) with coarray component shall be a
nonpointer, nonallocatable scalar
class(periodic_2nd_order), intent(in) :: this
1
Error: Variable 'dst' at (1) is INTENT(OUT) and can thus not be an allocatable
coarray or have coarray components
class(periodic_2nd_order), intent(in) :: this
1
Error: Component '_def_init' at (1) with coarray component shall be a
nonpointer, nonallocatable scalar
module periodic_2nd_order_module
implicit none
type periodic_2nd_order
real, allocatable :: global_f(:)[:]
contains
procedure :: output
end type
contains
subroutine output (this)
class(periodic_2nd_order), intent(in) :: this
end subroutine
end module
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/51632] [OOP] Bogus argument checking for generated _def_init parameter and _copy procedure with CAF
2011-12-20 8:03 [Bug fortran/51632] New: [OOP] Bogus argument checking for generated _def_init parameter and _copy procedure with CAF burnus at gcc dot gnu.org
@ 2011-12-20 8:04 ` burnus at gcc dot gnu.org
2012-09-03 6:36 ` burnus at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-12-20 8:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51632
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.6.3, 4.7.0
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-12-20 08:03:11 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))
{
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/51632] [OOP] Bogus argument checking for generated _def_init parameter and _copy procedure with CAF
2011-12-20 8:03 [Bug fortran/51632] New: [OOP] Bogus argument checking for generated _def_init parameter and _copy procedure with CAF burnus at gcc dot gnu.org
2011-12-20 8:04 ` [Bug fortran/51632] " burnus at gcc dot gnu.org
@ 2012-09-03 6:36 ` burnus at gcc dot gnu.org
2012-09-03 8:59 ` burnus at gcc dot gnu.org
2015-10-20 16:32 ` dominiq at lps dot ens.fr
3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-09-03 6:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51632
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-09-03 06:36:05 UTC ---
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/51632] [OOP] Bogus argument checking for generated _def_init parameter and _copy procedure with CAF
2011-12-20 8:03 [Bug fortran/51632] New: [OOP] Bogus argument checking for generated _def_init parameter and _copy procedure with CAF burnus at gcc dot gnu.org
2011-12-20 8:04 ` [Bug fortran/51632] " burnus at gcc dot gnu.org
2012-09-03 6:36 ` burnus at gcc dot gnu.org
@ 2012-09-03 8:59 ` burnus at gcc dot gnu.org
2015-10-20 16:32 ` dominiq at lps dot ens.fr
3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-09-03 8:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51632
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-09-03 08:59:19 UTC ---
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/51632] [OOP] Bogus argument checking for generated _def_init parameter and _copy procedure with CAF
2011-12-20 8:03 [Bug fortran/51632] New: [OOP] Bogus argument checking for generated _def_init parameter and _copy procedure with CAF burnus at gcc dot gnu.org
` (2 preceding siblings ...)
2012-09-03 8:59 ` burnus at gcc dot gnu.org
@ 2015-10-20 16:32 ` dominiq at lps dot ens.fr
3 siblings, 0 replies; 5+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-20 16:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51632
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2015-10-20
Ever confirmed|0 |1
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> 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?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-20 16:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-20 8:03 [Bug fortran/51632] New: [OOP] Bogus argument checking for generated _def_init parameter and _copy procedure with CAF burnus at gcc dot gnu.org
2011-12-20 8:04 ` [Bug fortran/51632] " burnus at gcc dot gnu.org
2012-09-03 6:36 ` burnus at gcc dot gnu.org
2012-09-03 8:59 ` burnus at gcc dot gnu.org
2015-10-20 16:32 ` dominiq at lps dot ens.fr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).