summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/scale_1.f90
blob: 72a9fd8d9c86265cc03e407fcd4100a84b5a5b2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
! { dg-do run }
! inspired by PR17175
REAL X
DOUBLE PRECISION Y

INTEGER, PARAMETER :: DP = KIND(Y)

INTEGER(kind=1) I1
INTEGER(kind=2) I2
INTEGER(kind=4) I4
INTEGER(kind=8) I8

X = 1.
Y = 1._DP

I1 = 10
I2 = -10
I4 = 20
I8 = -20

X = SCALE (X, I1)
X = SCALE (X, I2)
IF (X.NE.1.) CALL ABORT()
X = SCALE (X, I4)
X = SCALE (X, I8)
IF (X.NE.1.) CALL ABORT()

Y = SCALE (Y, I1)
Y = SCALE (Y, I2)
IF (Y.NE.1._DP) CALL ABORT()
Y = SCALE (Y, I4)
Y = SCALE (Y, I8)
IF (Y.NE.1._DP) CALL ABORT()

END