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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [transfer_simplify_10.f90] - Blame information for rev 708

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR fortran/46638
4
!
5
! Contributed by James Van Buskirk
6
!
7
program test5
8
   use ISO_C_BINDING
9
   implicit none
10
   type, bind(C) :: CPUID_type
11
      integer(C_INT32_T) eax
12
      integer(C_INT32_T) ebx
13
      integer(C_INT32_T) edx
14
      integer(C_INT32_T) ecx
15
      integer(C_INT32_T) bbb
16
   end type CPUID_type
17
   type(CPUID_TYPE) result
18
  result = transfer(achar(10)//achar(0)//achar(0)//achar(0)//'GenuineIntel'//'abcd',result)
19
 
20
  if((     int(z'0000000A') /= result%eax  &
21
      .or. int(z'756E6547') /= result%ebx  &
22
      .or. int(z'49656E69') /= result%edx  &
23
      .or. int(z'6C65746E') /= result%ecx  &
24
      .or. int(z'64636261') /= result%bbb) &
25
     .and. & ! Big endian
26
     (     int(z'0A000000') /= result%eax  &
27
      .or. int(z'47656E75') /= result%ebx  &
28
      .or. int(z'696E6549') /= result%edx  &
29
      .or. int(z'6E74656C') /= result%ecx  &
30
      .or. int(z'61626364') /= result%bbb)) then
31
    write(*,'(5(z8.8:1x))') result
32
    call abort()
33
  end if
34
end program test5

powered by: WebSVN 2.1.0

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