URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
694 |
jeremybenn |
! { dg-do run }
|
2 |
|
|
!
|
3 |
|
|
program test0
|
4 |
|
|
implicit none
|
5 |
|
|
real, parameter :: &
|
6 |
|
|
r = transfer(int(b'01000000001010010101001111111101',kind=4),0.)
|
7 |
|
|
complex, parameter :: z = r * (0, 1.)
|
8 |
|
|
real(kind=8), parameter :: rd = dble(b'00000000000000000000000000000000&
|
9 |
|
|
&01000000001010010101001111111101')
|
10 |
|
|
complex(kind=8), parameter :: zd = (0._8, 1._8) * rd
|
11 |
|
|
integer :: x = 0
|
12 |
|
|
|
13 |
|
|
if (cmplx(b'01000000001010010101001111111101',x,4) /= r) call abort
|
14 |
|
|
if (cmplx(x,b'01000000001010010101001111111101',4) /= z) call abort
|
15 |
|
|
if (complex(b'01000000001010010101001111111101',0) /= r) call abort
|
16 |
|
|
if (complex(0,b'01000000001010010101001111111101') /= z) call abort
|
17 |
|
|
|
18 |
|
|
!if (cmplx(b'00000000000000000000000000000000&
|
19 |
|
|
! &01000000001010010101001111111101',x,8) /= rd) call abort
|
20 |
|
|
!if (cmplx(x,b'00000000000000000000000000000000&
|
21 |
|
|
! &01000000001010010101001111111101',8) /= zd) call abort
|
22 |
|
|
!if (dcmplx(b'00000000000000000000000000000000&
|
23 |
|
|
! &01000000001010010101001111111101',x) /= rd) call abort
|
24 |
|
|
!if (dcmplx(x,b'00000000000000000000000000000000&
|
25 |
|
|
! &01000000001010010101001111111101') /= zd) call abort
|
26 |
|
|
|
27 |
|
|
end program test0
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.