summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/interface_42.f90
blob: d260755eb6a3612c7702607e44f28b81e860eb1c (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
! { dg-do compile }
! { dg-options "-fmax-errors=1" }
! PR fortran/84922
! Original code contributed by William Clodius.
module copy

   interface
      module subroutine foo_da(da, copy) ! { dg-error "(1)" }
         integer, intent(in) :: da(:)
         integer, allocatable, intent(out) :: copy(:)
      end subroutine foo_da
   end interface

   contains

      subroutine foo_da(da, copy) ! { dg-error "defined in interface body|PROCEDURE attribute conflicts with PROCEDURE attribute" }
         integer, intent(in) :: da(:)
         integer, allocatable, intent(out) :: copy(:)
         allocate( copy( size(da) ) )
         copy = da
      end subroutine foo_da

end module copy
! { dg-prune-output "compilation terminated" }