| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! Test fixes for PRs77532-4. |
| 4 |
! |
| 5 |
! Contributed by Gerhard Steinmetz <[email protected]> |
| 6 |
! |
| 7 |
! PR77532 - used to ICE |
| 8 |
module m1 |
| 9 |
type t |
| 10 |
end type |
| 11 |
interface read(unformatted) |
| 12 |
end interface |
| 13 |
end |
| 14 |
|
| 15 |
! PR77533 - used to ICE after error |
| 16 |
module m2 |
| 17 |
type t |
| 18 |
type(unknown), pointer :: next ! { dg-error "has not been declared" } |
| 19 |
contains |
| 20 |
procedure :: s ! { dg-error "Non-polymorphic passed-object" } |
| 21 |
generic :: write(formatted) => s |
| 22 |
end type |
| 23 |
contains |
| 24 |
subroutine s(x) ! { dg-error "Too few dummy arguments" } |
| 25 |
end |
| 26 |
end |
| 27 |
|
| 28 |
! PR77533 comment #1 - gave error 'KIND = 0' |
| 29 |
module m3 |
| 30 |
type t |
| 31 |
contains |
| 32 |
procedure :: s ! { dg-error "Non-polymorphic passed-object" } |
| 33 |
generic :: write(formatted) => s |
| 34 |
end type |
| 35 |
contains |
| 36 |
subroutine s(x) ! { dg-error "Too few dummy arguments" } |
| 37 |
class(t), intent(in) : x ! { dg-error "Invalid character in name" } |
| 38 |
end |
| 39 |
end |
| 40 |
|
| 41 |
! PR77534 |
| 42 |
module m4 |
| 43 |
type t |
| 44 |
end type |
| 45 |
interface read(unformatted) |
| 46 |
module procedure s |
| 47 |
end interface |
| 48 |
contains |
| 49 |
subroutine s(dtv) ! { dg-error "Too few dummy arguments" } |
| 50 |
type(t), intent(inout) :: dtv |
| 51 |
end |
| 52 |
end |