111
|
1 ! { dg-do compile }
|
|
2 !
|
|
3 ! PR 41873: Bogus Error: ABSTRACT INTERFACE must not be referenced...
|
|
4 !
|
|
5 ! Contributed by Harald Anlauf <anlauf@gmx.de>
|
|
6
|
|
7 implicit none
|
|
8
|
|
9 type, abstract :: abstype
|
|
10 contains
|
|
11 procedure(f), nopass, deferred :: f_bound
|
|
12 procedure(s), nopass, deferred :: s_bound
|
|
13 end type
|
|
14
|
|
15 abstract interface
|
|
16 real function f ()
|
|
17 end function
|
|
18 end interface
|
|
19
|
|
20 abstract interface
|
|
21 subroutine s
|
|
22 end subroutine
|
|
23 end interface
|
|
24
|
|
25 contains
|
|
26
|
|
27 subroutine cg (c)
|
|
28 class(abstype) :: c
|
|
29 print *, f() ! { dg-error "must not be referenced" }
|
|
30 call s ! { dg-error "must not be referenced" }
|
|
31 print *, c%f_bound ()
|
|
32 call c%s_bound ()
|
|
33 end subroutine
|
|
34
|
|
35 end
|