This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51947] New: [OOP]Polymorphic coarrays: Bogus errors for dummy arguments
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 22 Jan 2012 17:05:08 +0000
- Subject: [Bug fortran/51947] New: [OOP]Polymorphic coarrays: Bogus errors for dummy arguments
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51947
Bug #: 51947
Summary: [OOP]Polymorphic coarrays: Bogus errors for dummy
arguments
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
For the following program, one gets bogus errors - once for the dummy argument
and once for the generated __copy function (src, dst):
$ gfortran -fcoarray=single test.f90
class(t) :: x
1
Error: Component '_def_init' at (1) with coarray component shall be a
nonpointer, nonallocatable scalar
class(t) :: x
1
Error: Variable 'dst' at (1) is INTENT(OUT) and can thus not be an allocatable
coarray or have coarray components
class(t) :: x
1
Error: Component '_def_init' at (1) with coarray component shall be a
nonpointer, nonallocatable scalar
type t
integer, allocatable :: a[:]
end type t
contains
subroutine sub(x)
class(t) :: x
end subroutine sub
end