1 ! This gives incorrect results when compiled with
2 ! the intel and pgf90 compilers
8 Integer, Dimension(2) :: Next
11 Integer, Parameter :: N = 2
12 Integer, dimension (2, 4) :: results
15 Type(Link), Dimension(:,:), Pointer :: Perm
16 Integer, Dimension(2) :: Current
20 ! Print*, 'Spanned by indices'
22 Perm(mod(i-1,N)+1, (i-1)/N+1)%Next = (/ Mod(i,N) + 1, Mod(i/N+1,N)+1/)
23 ! Write(*,100) mod(i-1,N)+1, (i-1)/N+1, Perm(mod(i-1,N)+1, (i-1)/N+1)%Next
32 ! Print*, 'Spanned as a cycle'
35 results (:, i) = Perm(Current(1), Current(2))%Next
36 ! Write(*,100) Current, Perm(Current(1), Current(2))%Next
42 Current = Perm(Current(1), Current(2))%Next
45 if (any(results .ne. reshape ((/2,2,1,2,2,1,1,1/), (/2, 4/)))) call abort
47 ! 100 Format( 2I3, '--->', 2I3)