summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/array_memcpy_3.f90
blob: 0c4964d8fe3db46780482079ecd76c78623d0b38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do compile }
! { dg-options "-O2 -fdump-tree-original" }

subroutine foo(x)
  integer :: x(4)
  x(:) = (/ 3, 1, 4, 1 /)
end subroutine

subroutine bar(x)
  integer :: x(4)
  x = (/ 3, 1, 4, 1 /)
end subroutine

! { dg-final { scan-tree-dump-times "memcpy|ref-all\[^\\n\]*ref-all" 2 "original" } }
! { dg-final { cleanup-tree-dump "original" } }