This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/32962] b = conjg(transpose(a)) is erroneous if b is an allocatable array



------- Comment #10 from pault at gcc dot gnu dot org  2007-08-04 22:13 -------
The problem occurs whenever the destination array is described by and array
descriptor; eg.

  complex(kind=8) :: a(2,2), b(2,2)
  call testcase (a, b)
contains
  subroutine testcase (a, b)
    complex(kind=8) :: a(:,:), b(:,:)
    a(1,1) = 2
    a(2,1) = 3
    a(1,2) = 7
    a(2,2) = 11
    b = conjg(transpose(a))

    print *, 'original = ', a
    print *, 'WRONG conjg(transpose(a)) = ', b
    end subroutine
end program

also fails and no allocatable arrays are invoved.

Paul


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]