OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [intrinsic_abs.f90] - Blame information for rev 707

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 695 jeremybenn
! 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
8
 
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
15
 
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
22
 
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
29
 
30
   z = (3, 4)
31
   r = abs(z)
32
   if (r .ne. 5) call abort
33
end program

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.