blob: 98cfd7be48aa7f330efb2fd0d8dfc4b04a3f924e (
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
25
26
27
28
|
! { dg-do compile }
! { dg-options "-fdump-tree-original" }
!
! PR fortran/38669
! Temporary created for pointer as actual argument of an elemental subroutine
!
! Original testcase by Harald Anlauf <anlauf@gmx.de>
program gfcbu84_main
implicit none
integer :: jplev, k_lev
real :: p(42)
real, pointer :: q(:)
jplev = 42
k_lev = 1
allocate (q(jplev))
call tq_tvgh (q(k_lev:), p(k_lev:))
deallocate (q)
contains
elemental subroutine tq_tvgh (t, p)
real ,intent (out) :: t
real ,intent (in) :: p
t=p
end subroutine tq_tvgh
end program gfcbu84_main
! { dg-final { scan-tree-dump-times "atmp" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
|