Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gfortran.dg / elemental_dependency_3.f90
blob98cfd7be48aa7f330efb2fd0d8dfc4b04a3f924e
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
4 ! PR fortran/38669
5 ! Temporary created for pointer as actual argument of an elemental subroutine
7 ! Original testcase by Harald Anlauf <anlauf@gmx.de>
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)
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" } }
28 ! { dg-final { cleanup-tree-dump "original" } }