Debian Codegraph @

gcc/testsuite/gfortran.dg/power2.f90

raw
1 ! { dg-do compile }
2 ! PR fortran/46794
3
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.
7
8 ! Contributed by Daniel Kraft, [email protected].
9
10 PROGRAM main
11 IMPLICIT NONE
12
13 INTEGER(KIND=1) :: k1
14 INTEGER(KIND=2) :: k2
15
16 k1 = 1_1
17 k2 = 1_2
18
19 k1 = 1_1 + 1_1**k1
20 k2 = 1_2 + 1_2**k2
21
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