http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60191
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #5 from janus at gcc dot gnu.org ---
(In reply to Bernd Edlinger from comment #3)
> > The function "make_real" is not invoked directly, but through the type-bound
> > "a%real", which is called three times in the test case. Does the failure
> > occur already at the first one (i.e. line 67)? Can you give a reduced test
> > case?
>
> Yes it is in line 67.
Ok, then I guess the following reduction should be enough to trigger the bug?
module m
type :: t1
integer :: i = 42
contains
procedure, pass :: real => make_real
end type
contains
real function make_real (arg)
class(t1), intent(in) :: arg
make_real = real (arg%i)
end function make_real
end module m
use m
class(t1), pointer :: a
type(t1), target :: b
a => b
if (a%real() .ne. real (42)) call abort
end
Additionally you could try if calling 'make_real' directly (without the
type-binding) works, i.e. replace the last line by:
if (make_real(a) .ne. real (42)) call abort
> > The type-bound call is transformed into a procedure-pointer-component
> > call, i.e. "a._vptr->real (&a)". Do all the proc_ptr_comp_* test cases work
> > on ARMv7?
>
> Yes, the test cases that failed with the last snapshot are:
>
> FAIL: gfortran.dg/dynamic_dispatch_1.f03 -O0 execution test
> FAIL: gfortran.dg/dynamic_dispatch_3.f03 -O0 execution test
> FAIL: gfortran.dg/select_type_4.f90 -O2 execution test
This one might possibly be related. It also involves polymorphism (but no
type-bound procedures).