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