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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [compile/] [transfer-1.f90] - Blame information for rev 801

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

Line No. Rev Author Line
1 695 jeremybenn
! Bigendian test posted by Perseus in comp.lang.fortran on 4 July 2005.
2
   integer(1), parameter :: zero = 0
3
   LOGICAL, PARAMETER :: bigend = IACHAR(TRANSFER(1,"a")) == zero
4
   LOGICAL :: bigendian
5
   call foo ()
6
contains
7
   subroutine foo ()
8
   integer :: chr, ans
9
   if (bigend) then
10
     ans = 1
11
   else
12
     ans = 0
13
   end if
14
   chr = IACHAR(TRANSFER(1,"a"))
15
   bigendian =  chr == 0_4
16
   if (bigendian) then
17
     ans = 1
18
   else
19
     ans = 0
20
   end if
21
   end subroutine foo
22
end

powered by: WebSVN 2.1.0

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