* config/pa/linux-atomic.c (__kernel_cmpxchg): Reorder arguments to
[official-gcc.git] / gcc / testsuite / gfortran.fortran-torture / execute / intrinsic_abs.f90
blob9e44657bad148e26479d38af79aac5aa9786dd99
1 ! Program to test the ABS intrinsic
2 program intrinsic_abs
3 implicit none
4 integer i
5 real(kind=4) r
6 real(kind=8) q
7 complex z
9 i = 42
10 i = abs(i)
11 if (i .ne. 42) call abort
12 i = -43
13 i = abs(i)
14 if (i .ne. 43) call abort
16 r = 42.0
17 r = abs(r)
18 if (r .ne. 42.0) call abort
19 r = -43.0
20 r = abs(r)
21 if (r .ne. 43.0) call abort
23 q = 42.0_8
24 q = abs(q)
25 if (q .ne. 42.0_8) call abort
26 q = -43.0_8
27 q = abs(q)
28 if (q .ne. 43.0_8) call abort
30 z = (3, 4)
31 r = abs(z)
32 if (r .ne. 5) call abort
33 end program