This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/57365] [OOP] Sourced allocation fails with unlimited polymorphism
- From: "rxs at hotmail dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 May 2013 08:21:04 +0000
- Subject: [Bug fortran/57365] [OOP] Sourced allocation fails with unlimited polymorphism
- Auto-submitted: auto-generated
- References: <bug-57365-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57365
--- Comment #2 from rxs at hotmail dot de ---
Thank you for the suggested workaround. But it is not a solution, a non
unlimited polymorphic variable can not hold intrinsic data types like
character.
There also seems to be a problem with dummy arguments of type CLASS(*) in
general:
program bug
implicit none
call dummy_test("A test case")
contains
subroutine dummy_test(var)
class(*) :: var
select type (var)
type is (character(len=*))
print*, len(var), var
end select
end subroutine
end program bug
Compiled with ifort this program has the output:
11 A test case
That is correct.
Compiled with gfortran 4.8 this program has the output:
0
That is obviously not correct.