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: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Aug 2007 07:56:09 -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 #5 from burnus at gcc dot gnu dot org 2007-08-02 07:56 -------
The essential point is that "b" is allocatable; "a" can be a parameter or a
simple dimension(2,2) array. The kind does also not matter. If one uses only
conjg or only transpose there is no error.
Also, if one reverts the order, i.e. uses transpose(conjg(a)), the result is
correct.
program testcase
implicit none
complex, allocatable :: b(:,:)
complex,parameter :: a(1,1) = Reshape([ 2 ],[1,1])
allocate(b(1,1))
b = conjg(transpose(a))
! print *, a
! print *, b
end program
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.3.0 4.2.1 4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32962