| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-fdump-tree-original" } |
| 3 |
! |
| 4 |
! PR fortran/38669 |
| 5 |
! Temporary created for pointer as actual argument of an elemental subroutine |
| 6 |
! |
| 7 |
! Original testcase by Harald Anlauf <[email protected]> |
| 8 |
|
| 9 |
program gfcbu84_main |
| 10 |
implicit none |
| 11 |
integer :: jplev, k_lev |
| 12 |
real :: p(42) |
| 13 |
real, pointer :: q(:) |
| 14 |
jplev = 42 |
| 15 |
k_lev = 1 |
| 16 |
allocate (q(jplev)) |
| 17 |
call tq_tvgh (q(k_lev:), p(k_lev:)) |
| 18 |
deallocate (q) |
| 19 |
|
| 20 |
contains |
| 21 |
elemental subroutine tq_tvgh (t, p) |
| 22 |
real ,intent (out) :: t |
| 23 |
real ,intent (in) :: p |
| 24 |
t=p |
| 25 |
end subroutine tq_tvgh |
| 26 |
end program gfcbu84_main |
| 27 |
! { dg-final { scan-tree-dump-times "atmp" 0 "original" } } |