hades [TEST] cat bug-mvbits.f90 program main implicit none integer :: a( 1 ), b( 1 ) integer :: x, y
a = 1 b = 0 x = 1 y = 0 call mvbits (a, 0, 1, b, 1) call mvbits (x, 0, 1, y, 1) write (*, *) 'a: ', a write (*, *) 'x: ', x write (*, *) write (*, *) 'b: ', b write (*, *) 'y: ', y write (*, *) if ( all (b == y) ) then write (*, *) 'GOOD: b == y' else write (*, *) 'BAD: b /= y' end if end program main hades [TEST] ./a.out a: 1 x: 1 b: 0 y: 2 BAD: b /= y hades [TEST] gfortran --version GNU Fortran (GCC) 4.2.1 (Ubuntu 4.2.1-5ubuntu4) Copyright (C) 2007 Free Software Foundation, Inc. It does not work for MacOS PowerPC either, same output. The version I used ton my Mac was: epsilon [TEST] gfortran --version GNU Fortran (GCC) 4.3.0 20071017 (experimental) [trunk revision 129405] Copyright (C) 2007 Free Software Foundation, Inc. -- Summary: MVBITS does not work for arrays Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: phl at kth dot se GCC build triplet: ? GCC host triplet: ? GCC target triplet: ? http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34262