------- Comment #13 from ebotcazou at gcc dot gnu dot org  2006-04-01 17:10 
-------
Is transfer_array_intrinsic_1.f90 portable to big-endian? It fails on SPARC.

Reduced testcase:

     integer(4) :: y(4)
     character(4) :: ch(4)
     y = (/(i + ishft (i + 1, 8) + ishft (i + 2, 16) &
              + ishft (i + 3, 24), i = 65, 80 , 4)/)

     ch = "wxyz"
     ch = transfer (y(2:4:2), ch)
     if (any (ch .ne. (/"EFGH","MNOP","wxyz","wxyz"/))) call abort ()
end

Breakpoint 1, MAIN__ () at transfer_array_intrinsic_1.f90:8
8            if (any (ch .ne. (/"EFGH","MNOP","wxyz","wxyz"/))) call abort ()
(gdb) p ch
$13 = (( 72 'H', 71 'G', 70 'F', 69 'E') ( 80 'P', 79 'O', 78 'N', 77 'M') (
119 'w', 120 'x', 121 'y', 122 'z') ( 119 'w', 120 'x', 121 'y', 122 'z') )


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17298

Reply via email to