blob: 9387b6b8fea24e0d169487c1e06b63d66cd60323 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
! { dg-do compile }
!
! PR 54387: [F03] Wrongly accepts non-proc result variable on the RHS of a proc-pointer assignment
!
! Contributed by James Van Buskirk
integer function foo()
procedure(), pointer :: i
i => foo ! { dg-error "is invalid as proc-target in procedure pointer assignment" }
end
recursive function bar() result (res)
integer :: res
procedure(), pointer :: j
j => bar
end
|