aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr96102b.f90
blob: 82147da3893bcc962b3b1fd6b18252e7ad93b9b5 (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 }
!
! PR fortran/108544 - host association
! Variation of testcase pr96102.f90 using subroutines instead of functions

module m
  type mytype
    integer :: i
  end type
  type(mytype) :: d = mytype (42) ! { dg-error "is host associated" }
  integer      :: n = 2           ! { dg-error "is host associated" }
contains
  subroutine s
    if ( n   /= 0 ) stop 1  ! { dg-error "internal procedure of the same name" }
    if ( d%i /= 0 ) stop 2  ! { dg-error "internal procedure of the same name" }
  contains
    subroutine n()
    end
    subroutine d()
    end
  end
end

! { dg-prune-output "Operands of comparison operator" }