2 ! { dg-options "-ffrontend-optimize -fdump-tree-original" }
3 ! PR 57071 - Check that 1**k is transformed into 1
6 integer, parameter :: n
= 3
7 integer(kind
=8), dimension(-n
:n
) :: a
8 integer, dimension(-n
:n
) :: c
, d
11 integer (kind
=2) :: i2
15 ! Test in scalar expressions
17 if (v
/= 1**i
) call abort
20 ! Test in array constructors
21 a(-m
:m
) = [ (1**i
, i
= -m
, m
) ]
22 if (any(a
.ne
. v
)) call abort
24 ! Test in array expressions
25 c
= [ ( i
, i
= -n
, n
) ]
27 if (any(d
.ne
. v
)) call abort
29 ! Test in different kind expressions
31 if (v
/= 1**i2
) call abort
35 ! { dg-final { scan-tree-dump-times "_gfortran_pow_i4_i4" 0 "original" } }