http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901
Bug #: 55901
Summary: [OOP] type is (character(len=*)) misinterpreted as
array
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
Hi,
this small example is IMO wrongly rejected:
module gfcbug123
implicit none
type myobj
class(*), allocatable :: x
contains
procedure :: print
end type myobj
contains
subroutine print(this)
class(myobj) :: this
select type (x => this% x)
type is (character(len=*))
print *, "String: ", x(1:len(x))
end select
end subroutine print
end module gfcbug123
% gfc-trunk gfcbug123.f90 -c
gfcbug123.f90:12.30:
type is (character(len=*))
1
Error: Associate-name '__tmp_CHARACTER_0_1' at (1) is used as array