libgfortran/ChangeLog:
[official-gcc.git] / gcc / testsuite / gfortran.dg / power2.f90
blob5e2cf0440fc9eccde944f18b92fbec51ce08349c
1 ! { dg-do compile }
2 ! PR fortran/46794
4 ! Check that results of powers of integers with kinds 1 and 2 are
5 ! correctly converted back; this used to ICE because a conversion
6 ! from kind 4 to the correct one was missing.
8 ! Contributed by Daniel Kraft, d@domob.eu.
10 PROGRAM main
11 IMPLICIT NONE
13 INTEGER(KIND=1) :: k1
14 INTEGER(KIND=2) :: k2
16 k1 = 1_1
17 k2 = 1_2
19 k1 = 1_1 + 1_1**k1
20 k2 = 1_2 + 1_2**k2
22 k2 = 1_1 + 1_1**k2
23 k2 = 1_1 + 1_2**k1
24 k2 = 1_1 + 1_2**k2
25 END PROGRAM main