1893SN/A! { dg-do run }
29330SN/A!
3893SN/A! PR fortran/46638
4893SN/A!
5893SN/A! Contributed by James Van Buskirk
6893SN/A!
72362SN/Aprogram test5
8893SN/A   use ISO_C_BINDING
92362SN/A   implicit none
10893SN/A   type, bind(C) :: CPUID_type
11893SN/A      integer(C_INT32_T) eax
12893SN/A      integer(C_INT32_T) ebx
13893SN/A      integer(C_INT32_T) edx
14893SN/A      integer(C_INT32_T) ecx
15893SN/A      integer(C_INT32_T) bbb
16893SN/A   end type CPUID_type
17893SN/A   type(CPUID_TYPE) result
18893SN/A  result = transfer(achar(10)//achar(0)//achar(0)//achar(0)//'GenuineIntel'//'abcd',result)
19893SN/A
20893SN/A  if((     int(z'0000000A') /= result%eax  &
212362SN/A      .or. int(z'756E6547') /= result%ebx  &
222362SN/A      .or. int(z'49656E69') /= result%edx  &
232362SN/A      .or. int(z'6C65746E') /= result%ecx  &
24893SN/A      .or. int(z'64636261') /= result%bbb) &
25893SN/A     .and. & ! Big endian
26893SN/A     (     int(z'0A000000') /= result%eax  &
27893SN/A      .or. int(z'47656E75') /= result%ebx  &
28893SN/A      .or. int(z'696E6549') /= result%edx  &
29893SN/A      .or. int(z'6E74656C') /= result%ecx  &
30893SN/A      .or. int(z'61626364') /= result%bbb)) then
31893SN/A    write(*,'(5(z8.8:1x))') result
32893SN/A    call abort()
3313050Schegar  end if
34893SN/Aend program test5
35893SN/A