3 ! Checks the fix for PR68196, comment #8
5 ! Contributed by Damian Rouson <damian@sourceryinstitute.org>
7 type Bug
! Failed at trans--array.c:8269
8 real, allocatable
:: scalar
9 procedure(boogInterface
),pointer :: boog
12 function boogInterface(A
) result(C
)
19 real, parameter :: ninetynine
= 99.0
20 real, parameter :: onenineeight
= 198.0
22 type(bug
) :: actual
, res
24 actual
%scalar
= ninetynine
25 actual
%boog
=> boogImplementation
27 res
= actual
%boog () ! Failed on bug in expr.c:3933
28 if (res
%scalar
.ne
. onenineeight
) call abort
30 ! Make sure that the procedure pointer is assigned correctly
31 if (actual
%scalar
.ne
. ninetynine
) call abort
33 if (actual
%scalar
.ne
. onenineeight
) call abort
35 ! Deallocate so that we can use valgrind to check for memory leaks
36 deallocate (res
%scalar
, actual
%scalar
)
39 function boogImplementation(A
) result(C
) ! Failed at trans--array.c:8078
45 C
%scalar
= onenineeight