blob: cf939328139c030299ce85bf92abd648713de83c (
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
! { dg-do compile }
!
! Test fixes for PRs77532-4.
!
! Contributed by Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de>
!
! PR77532 - used to ICE
module m1
type t
end type
interface read(unformatted)
end interface
end
! PR77533 - used to ICE after error
module m2
type t
type(unknown), pointer :: next ! { dg-error "has not been declared" }
contains
procedure :: s ! { dg-error "Non-polymorphic passed-object" }
generic :: write(formatted) => s
end type
contains
subroutine s(x) ! { dg-error "Too few dummy arguments" }
end
end
! PR77533 comment #1 - gave error 'KIND = 0'
module m3
type t
contains
procedure :: s ! { dg-error "Non-polymorphic passed-object" }
generic :: write(formatted) => s
end type
contains
subroutine s(x) ! { dg-error "Too few dummy arguments" }
class(t), intent(in) : x ! { dg-error "Invalid character in name" }
end
end
! PR77534
module m4
type t
end type
interface read(unformatted)
module procedure s
end interface
contains
subroutine s(dtv) ! { dg-error "Too few dummy arguments" }
type(t), intent(inout) :: dtv
end
end
|