2 ! { dg-options "-fdump-tree-original" }
3 ! Check for different combinations of lbound for dummy arrays,
4 ! stressing empty arrays. The assignments with "one =" should
5 ! be simplified at compile time.
9 subroutine foo (a
, b
, one
, m
)
10 integer, dimension(:), intent(in
) :: a
11 integer, dimension (-2:), intent(in
) :: b
12 integer, intent(out
) :: one
, m
17 subroutine bar (a
, b
, n
, m
)
18 integer, dimension(:), allocatable
, intent(inout
) :: a
19 integer, dimension(:), pointer, intent(inout
) :: b
20 integer, intent(out
) :: n
, m
25 subroutine baz (a
, n
, m
, s
)
26 integer, intent(in
) :: n
,m
27 integer, intent(out
) :: s
28 integer, dimension(n
:m
) :: a
32 subroutine qux (a
, s
, one
)
33 integer, intent(in
) :: s
34 integer, dimension(s
) :: a
35 integer, intent(out
) :: one
43 integer, dimension(3), target
:: a
, b
44 integer, dimension(0) :: empty
45 integer, dimension(:), allocatable
:: x
46 integer, dimension(:), pointer :: y
51 if (n
.ne
. 1 .or
. m
.ne
. -2) call abort
52 call foo(a(2:0), empty
, n
, m
)
53 if (n
.ne
. 1 .or
. m
.ne
. 1) call abort
54 call foo(empty
, a(2:0), n
, m
)
55 if (n
.ne
. 1 .or
. m
.ne
. 1) call abort
59 if (n
.ne
. 1 .or
. m
.ne
. 1) call abort
62 if (n
.ne
. 1) call abort
65 if (n
.ne
. 2) call abort
68 if (n
.ne
. 1) call abort
70 ! { dg-final { scan-tree-dump-times "\\*one = 1" 2 "original" } }