blob: fc48fccb648f18e83e7eed5dc00b57d7daae3416 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
! { dg-do compile }
!
! PR 54190: TYPE(*)/assumed-rank: Type/rank check too relaxed for dummy procedure
! PR 57217: [4.7/4.8/4.9 Regression][OOP] Accepts invalid TBP overriding - lacking arguments check
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
module base_mod
implicit none
type base_type
integer :: kind
contains
procedure, pass(map) :: clone => base_clone
end type
contains
subroutine base_clone(map,mapout,info)
class(base_type), intent(inout) :: map
class(base_type), intent(inout) :: mapout
integer :: info
end subroutine
end module
module r_mod
use base_mod
implicit none
type, extends(base_type) :: r_type
real :: dat
contains
procedure, pass(map) :: clone => r_clone ! { dg-error "Type mismatch in argument" }
end type
contains
subroutine r_clone(map,mapout,info)
class(r_type), intent(inout) :: map
!gcc$ attributes no_arg_check :: mapout
integer, intent(inout) :: mapout
integer :: info
end subroutine
end module
|