Merge from trunk @ 138209
[official-gcc.git] / gcc / testsuite / gfortran.dg / internal_pack_5.f90
blob87705fa716aa7f37a5d582c3740b019174edca67
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
4 ! PR fortran/36909
6 ! Check that no unneeded internal_unpack is
7 ! called (INTENT(IN)!).
9 program test
10 implicit none
11 integer :: a(3,3)
12 call foo(a(1,:))
13 contains
14 subroutine foo(x)
15 integer,intent(in) :: x(3)
16 end subroutine foo
17 end program test
19 ! { dg-final { scan-tree-dump-times "_gfortran_internal_pack" 1 "original" } }
20 ! { dg-final { scan-tree-dump-times "_gfortran_internal_unpack" 0 "original" } }
21 ! { dg-final { cleanup-tree-dump "original" } }