]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/46638 (Wrong result with TRANSFER from string to DT)
authorTobias Burnus <burnus@net-b.de>
Sat, 27 Nov 2010 21:26:15 +0000 (22:26 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Sat, 27 Nov 2010 21:26:15 +0000 (22:26 +0100)
2010-11-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/46638
        PR fortran/46668
        * gfortran.dg/transfer_simplify_10.f90: Fix endian issue.

From-SVN: r167210

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/transfer_simplify_10.f90

index c285812bbbadaced01992dc08dce57397c8336a9..deb96d998c21e28928e814dac3677476daa2530f 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-27  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/46638
+       PR fortran/46668
+       * gfortran.dg/transfer_simplify_10.f90: Fix endian issue.
+
 2010-11-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * lib/gnat.exp: Load gcc.exp.
@@ -13,8 +19,7 @@
 2010-11-25  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/46638
-       * target-memory.c (gfc_interpret_derived): Correctly handle
-       component offset.
+       * gfortran.dg/transfer_simplify_10.f90: New.
 
 2010-11-20  Eric Botcazou  <ebotcazou@adacore.com>
 
index d0c83b5ca129c89ec1c06641019410f03756c0fe..3a56e65a6cc25b7c03d0dae1d21fb2078decf06d 100644 (file)
@@ -17,11 +17,17 @@ program test5
    type(CPUID_TYPE) result
   result = transfer(achar(10)//achar(0)//achar(0)//achar(0)//'GenuineIntel'//'abcd',result)
 
-  if (     int(z'0000000A') /= result%eax  &
+  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) then
+      .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