repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix compilation failure with C++98 compilers
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
power2.f90
blob
5e2cf0440fc9eccde944f18b92fbec51ce08349c
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, d@domob.eu.
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