summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/internal_pack_5.f90
blob: 87705fa716aa7f37a5d582c3740b019174edca67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
! { dg-do compile }
! { dg-options "-fdump-tree-original" }
!
! PR fortran/36909
!
! Check that no unneeded internal_unpack is
! called (INTENT(IN)!).
!
program test
  implicit none
  integer :: a(3,3)
  call foo(a(1,:))
contains
  subroutine foo(x)
    integer,intent(in) :: x(3)
  end subroutine foo
end program test

! { dg-final { scan-tree-dump-times "_gfortran_internal_pack" 1 "original" } }
! { dg-final { scan-tree-dump-times "_gfortran_internal_unpack" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }