1 ! PR rtl-optimization/46804
3 ! { dg-options "-O -fPIC -fexpensive-optimizations -fgcse -foptimize-register-move -fpeel-loops -fno-tree-loop-optimize" }
6 integer, parameter :: n1
= 2, n2
= 3, n3
= 4, slen
= 3
7 character (len
= slen
), dimension (n1
, n2
, n3
) :: a
8 integer (kind
= 1), dimension (2, 4) :: shift1
9 integer (kind
= 2), dimension (2, 4) :: shift2
10 integer (kind
= 4), dimension (2, 4) :: shift3
14 a (i1
, i2
, i3
) = 'ab'(i1
:i1
) // 'cde'(i2
:i2
) // 'fghi'(i3
:i3
)
18 shift1 (1, :) = (/ 4, 11, 19, 20 /)
19 shift1 (2, :) = (/ 55, 5, 1, 2 /)
22 call test (cshift (a
, shift2
, 2))
23 call test (cshift (a
, shift3
, 2))
26 character (len
= slen
), dimension (n1
, n2
, n3
) :: b
30 i2p
= mod (shift1 (i1
, i3
) + i2
- 1, n2
) + 1
31 if (b (i1
, i2
, i3
) .ne
. a (i1
, i2p
, i3
)) call abort