Debian Codegraph @

gcc/testsuite/gfortran.dg/deferred_character_20.f90

raw
1 ! { dg-do compile }
2 !
3 ! Test the fix for PR86408.
4 !
5 ! Contributed by Janus Weil <[email protected]>
6 !
7 module m
8
9 implicit none
10
11 type, abstract :: t
12 contains
13 procedure(ifc), deferred :: tbf
14 procedure :: tbs
15 end type
16
17 abstract interface
18 function ifc(x) result(str)
19 import :: t
20 class(t) :: x
21 character(len=:), allocatable :: str
22 end function
23 end interface
24
25 contains
26
27 subroutine tbs(x)
28 class(t) :: x
29 print *, x%tbf()
30 end subroutine
31
32 end