diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gfortran.dg/transfer_simplify_10.f90 | |
download | cbb-gcc-4.6.4-upstream.tar.bz2 cbb-gcc-4.6.4-upstream.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gfortran.dg/transfer_simplify_10.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/transfer_simplify_10.f90 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/transfer_simplify_10.f90 b/gcc/testsuite/gfortran.dg/transfer_simplify_10.f90 new file mode 100644 index 000000000..3a56e65a6 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/transfer_simplify_10.f90 @@ -0,0 +1,34 @@ +! { dg-do run } +! +! PR fortran/46638 +! +! Contributed by James Van Buskirk +! +program test5 + use ISO_C_BINDING + implicit none + type, bind(C) :: CPUID_type + integer(C_INT32_T) eax + integer(C_INT32_T) ebx + integer(C_INT32_T) edx + integer(C_INT32_T) ecx + integer(C_INT32_T) bbb + end type CPUID_type + type(CPUID_TYPE) result + result = transfer(achar(10)//achar(0)//achar(0)//achar(0)//'GenuineIntel'//'abcd',result) + + if(( int(z'0000000A') /= result%eax & + .or. int(z'756E6547') /= result%ebx & + .or. int(z'49656E69') /= result%edx & + .or. int(z'6C65746E') /= result%ecx & + .or. int(z'64636261') /= result%bbb) & + .and. & ! Big endian + ( int(z'0A000000') /= result%eax & + .or. int(z'47656E75') /= result%ebx & + .or. int(z'696E6549') /= result%edx & + .or. int(z'6E74656C') /= result%ecx & + .or. int(z'61626364') /= result%bbb)) then + write(*,'(5(z8.8:1x))') result + call abort() + end if +end program test5 |