aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/dtio_11.f90
blob: cf8dd365d3c000a8c312962407cc2c4e8a0700e9 (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
! { 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 "is a type that has not been declared" }
   contains
      procedure :: s
      generic :: write(formatted) => s
   end type
contains
   subroutine s(x)
   end
end

! PR77533 comment #1 - gave warning that
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 "must be of type CLASS" }
      class(t), intent(in) : x ! { dg-error "Invalid character in name" }
   end
end