This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51948] New: [OOP] Rejects valid: Polymorphic arguments in MOVE_ALLOC
- 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:31:16 +0000
- Subject: [Bug fortran/51948] New: [OOP] Rejects valid: Polymorphic arguments in MOVE_ALLOC
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51948
Bug #: 51948
Summary: [OOP] Rejects valid: Polymorphic arguments in
MOVE_ALLOC
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 fails at move_alloc with bogus errors. The second example is
based on the example from
chapter09/burgers_factory_f2003/periodic_6th_order.F90 in the book
http://www.cambridge.org/rouson
type t
end type t
contains
function func(x)
class(t), allocatable :: x(:), func(:)
call move_alloc (x, func)
! FAILS: Error: the 'from' and 'to' arguments of 'move_alloc' intrinsic at (1)
must have the same rank 0/1
end function
function func2(x)
type(t), allocatable :: x
class(t), allocatable :: func2
call move_alloc (x, func)
! FAILS: Error: 'to' argument of 'move_alloc' intrinsic at (1) must be a
variable
end function
end