145
|
1 ! { dg-do compile }
|
|
2 ! PR fortran/88072
|
|
3 ! Original code contributed by Andrew Wood <andrew at fluidgravity dot co.uk>
|
|
4 module m1
|
|
5
|
|
6 implicit none
|
|
7
|
|
8 type, abstract, public :: t1
|
|
9 integer, dimension(:), allocatable :: i
|
|
10 contains
|
|
11 procedure(f1), deferred :: f
|
|
12 end type t1
|
|
13
|
|
14 type, extends(t1), public :: t2 ! { dg-error "must be ABSTRACT because" }
|
|
15 contains
|
|
16 procedure :: f => f2 ! { dg-error "mismatch for the overriding" }
|
|
17 end type t2
|
|
18
|
|
19 abstract interface
|
|
20 function f1(this) ! { dg-error "must be dummy, allocatable or" }
|
|
21 import
|
|
22 class(t1) :: this
|
|
23 class(t1) :: f1
|
|
24 end function f1
|
|
25 end interface
|
|
26 contains
|
|
27 type(t2) function f2(this)
|
|
28 class(t2) :: this
|
|
29 end function f2
|
|
30 end module m1
|