gcc/fortran/
[official-gcc.git] / gcc / testsuite / gfortran.dg / elemental_dependency_3.f90
blobac0a8825ebbc7a1cbc0c26273627079a6f37f550
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" } }