2 ! { dg-options "-fdump-tree-original" }
10 call explicit_shape1 ()
14 subroutine scalar1 (slr1
)
15 integer, optional
:: slr1
17 end subroutine scalar1
19 subroutine assumed_shape1 (as1
)
20 integer, dimension(:), optional
:: as1
21 call assumed_shape2 (as1
)
22 call explicit_shape2 (as1
)
23 end subroutine assumed_shape1
25 subroutine explicit_shape1 (es1
)
26 integer, dimension(5), optional
:: es1
27 call assumed_shape2 (es1
)
28 call explicit_shape2 (es1
)
29 end subroutine explicit_shape1
33 subroutine assumed_shape2 (as2
)
34 integer, dimension(:),optional
:: as2
35 if (present (as2
)) call abort()
36 end subroutine assumed_shape2
38 subroutine explicit_shape2 (es2
)
39 integer, dimension(5),optional
:: es2
40 if (present (es2
)) call abort()
41 end subroutine explicit_shape2
43 subroutine scalar2 (slr2
)
44 integer, optional
:: slr2
45 if (present (slr2
)) call abort()
46 end subroutine scalar2
50 ! { dg-final { scan-tree-dump-times "scalar2 \\(slr1" 1 "original" } }
52 ! { dg-final { scan-tree-dump-times "= es1 != 0B" 1 "original" } }
53 ! { dg-final { scan-tree-dump-times "assumed_shape2 \\(es1" 0 "original" } }
54 ! { dg-final { scan-tree-dump-times "explicit_shape2 \\(es1" 1 "original" } }
56 ! { dg-final { scan-tree-dump-times "= as1 != 0B" 2 "original" } }
57 ! { dg-final { scan-tree-dump-times "assumed_shape2 \\(as1" 0 "original" } }
58 ! { dg-final { scan-tree-dump-times "explicit_shape2 \\(as1" 0 "original" } }