[Bug fortran/41766] New: [OOP] SELECT TYPE selector as actual argument with INTENT(INOUT)
janus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Oct 20 16:46:00 GMT 2009
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
More information about the Gcc-bugs
mailing list