diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/internal_pack_5.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/internal_pack_5.f90 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/internal_pack_5.f90 b/gcc/testsuite/gfortran.dg/internal_pack_5.f90 new file mode 100644 index 000000000..87705fa71 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/internal_pack_5.f90 @@ -0,0 +1,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" } } |