summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/interface_22.f90
blob: fa8e517a186538a2ac74f0e4cd5541c66ceb6c90 (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
! { dg-do compile }
!
! This is a check for error recovery: we used to ICE in various places, or
! emit bogus error messages (PR 25252)
!
module foo
  interface bar
    module procedure X, Y, ! { dg-error "Syntax error in MODULE PROCEDURE statement" }
  end interface bar
end module

module g
  interface i
    module procedure sint => sreal ! { dg-error "Syntax error in MODULE PROCEDURE statement" }
  end interface i
end module g

module gswap
  type points
    real :: x, y
  end type points
  interface swap
    module procedure sreal, schar, sint => sreal ! { dg-error "Syntax error in MODULE PROCEDURE statement" }
  end interface swap
end module gswap

! { dg-final { cleanup-modules "foo g gswap" } }