1! { dg-do compile }
2! { dg-options "-O2 -fdump-ipa-cp-details -fno-inline -fdump-tree-optimized" }
3
4subroutine bar (a, b, n)
5  integer :: a(n), b(n)
6  call foo (a, b)
7contains
8subroutine foo (a, b)
9  integer :: a(:), b(:)
10  a = b
11end subroutine
12end
13
14! { dg-final { scan-ipa-dump "Creating a specialized node of foo" "cp" } }
15! { dg-final { scan-ipa-dump-times "Aggregate replacements\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=" 2 "cp" } }
16! { dg-final { scan-tree-dump-not "stride;" "optimized" } }
17! { dg-final { scan-tree-dump-not "lbound;" "optimized" } }
18