This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/57365] [OOP] Sourced allocation fails with unlimited polymorphism


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]