| Issue |
161315
|
| Summary |
[flang] procedure pointer pointing to internal procedure
|
| Labels |
flang:frontend
|
| Assignees |
|
| Reporter |
kkwli
|
The following code gets `SIGSEGV` on x86.
```f90
module m
implicit none
integer :: j
abstract interface
subroutine sub1a(a)
integer :: a
end
end interface
procedure(sub1a), pointer :: fp
end module
program main
use m
j = 10
call sub2(0)
! call sub2(1)
call sub3()
end
subroutine sub2(cond)
use m
integer :: k, cond
k = 11 + cond
if (cond == 0) then
fp => myintf
else
call fp(3)
endif
contains
subroutine myintf(a)
implicit none
integer :: i, a
i = j + 1 + a + k
print *, i
end
end
subroutine sub3()
call sub2(1)
end
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs