gfortran routine mvbits returns wrong answer (Absoft shows the correct answer) -
[dranta:~/tests/gfortran-D] dir% gfortran -o sage02 sage02.f90 [dranta:~/tests/gfortran-D] dir% sage02 FFFFFFFFFFFFFFFF 0 1F 0 [dranta:~/tests/gfortran-D] dir% f90 -o sage02 sage02.f90 [dranta:~/tests/gfortran-D] dir% sage02 ffffffffffffffff 0 ffff00000000001f 0 [dranta:~/tests/gfortran-D] dir% cat sage02.f90 implicit none integer, parameter :: INT8 = SELECTED_INT_KIND(16) integer(INT8) :: ieee64_int, cray64_int data cray64_int / 0_INT8/ data ieee64_int /-1_INT8/ write(6,'(2z20)')ieee64_int,cray64_int call mvbits(cray64_int, 0,43,ieee64_int, 5) ! copy and shift the mantissa write(6,'(2z20)')ieee64_int,cray64_int stop end -- Summary: gfortran routine mvbits returns wrong answer. Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dir at lanl dot gov GCC host triplet: powerpc-apple-darwin8.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25577