------- Comment #4 from dominiq at lps dot ens dot fr 2008-03-28 16:22 ------- It looks like a missing temporary:
integer, dimension(10) :: ILA1 = (/1,2,3,4,5,6,7,8,9,10/), ILA2, ILA3 ILA3 = (/9,9,6,2,4,9,2,9,6,10/) print '(10(I3))', ILA1((/9,9,6,2,4,9,2,9,6,10/)) ILA2 = ILA1 do i = 1, 10 call mvbits (ila2(ila3(i)), 2, 4, ila2(i), 3) end do write (*,'(10(I3))') ila2 ILA2 = ILA1 call mvbits ((ILA1((/9,9,6,2,4,9,2,9,6,10/))), 2, 4, ILA2, 3) write (*,'(10(I3))') ila2 call mvbits ((ILA1((/9,9,6,2,4,9,2,9,6,10/))), 2, 4, ILA1, 3) write (*,'(10(I3))') ila1 if (any(ila1 /= ila2)) call abort() end yields 9 9 6 2 4 9 2 9 6 10 17 18 11 36 77 22 39 16 41 18 17 18 11 4 13 22 7 16 9 18 17 18 11 36 77 22 39 16 41 18 Abort -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35681