This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41766] New: [OOP] SELECT TYPE selector as actual argument with INTENT(INOUT)
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Oct 2009 16:46:43 -0000
- Subject: [Bug fortran/41766] New: [OOP] SELECT TYPE selector as actual argument with INTENT(INOUT)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Test case:
implicit none
type t1
integer :: a
end type
type, extends(t1) :: t2
integer :: b
end type
class(t1),pointer :: cp
allocate(t2 :: cp)
select type (cp)
type is (t2)
call s(cp)
end select
contains
subroutine s(f)
type(t2), intent(inout) :: f
end subroutine
end
This fails with:
call s(cp)
1
Error: Actual argument at (1) must be definable as the dummy argument 'f' is
INTENT = OUT/INOUT
--
Summary: [OOP] SELECT TYPE selector as actual argument with
INTENT(INOUT)
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41766