This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32962] b = conjg(transpose(a)) is erroneous if b is an allocatable array
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Aug 2007 22:13:19 -0000
- Subject: [Bug fortran/32962] b = conjg(transpose(a)) is erroneous if b is an allocatable array
- References: <bug-32962-3515@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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