c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr96102b.f90
blob82147da3893bcc962b3b1fd6b18252e7ad93b9b5
1 ! { dg-do compile }
3 ! PR fortran/108544 - host association
4 ! Variation of testcase pr96102.f90 using subroutines instead of functions
6 module m
7 type mytype
8 integer :: i
9 end type
10 type(mytype) :: d = mytype (42) ! { dg-error "is host associated" }
11 integer :: n = 2 ! { dg-error "is host associated" }
12 contains
13 subroutine s
14 if ( n /= 0 ) stop 1 ! { dg-error "internal procedure of the same name" }
15 if ( d%i /= 0 ) stop 2 ! { dg-error "internal procedure of the same name" }
16 contains
17 subroutine n()
18 end
19 subroutine d()
20 end
21 end
22 end
24 ! { dg-prune-output "Operands of comparison operator" }