[Bug fortran/35740] a = conjg(transpose(a)) still gives wrong results, see bug 31994

2008-03-30 Thread pault at gcc dot gnu dot org


--- Comment #6 from pault at gcc dot gnu dot org  2008-03-30 14:25 ---
Fixed on trunk and 4.3.  Thanks for the report.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/35740] a = conjg(transpose(a)) still gives wrong results, see bug 31994

2008-03-30 Thread pault at gcc dot gnu dot org


--- Comment #5 from pault at gcc dot gnu dot org  2008-03-30 14:23 ---
Subject: Bug 35740

Author: pault
Date: Sun Mar 30 14:23:10 2008
New Revision: 133730

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133730
Log:
2008-03-30  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/35740
* resolve.c (resolve_function, resolve_call): If the procedure
is elemental do not look for noncopying intrinsics.

2008-03-30  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/35740
* gfortran.dg/transpose_conjg_1.f90: New test.

Added:
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/transpose_conjg_1.f90
Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/resolve.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/35740] a = conjg(transpose(a)) still gives wrong results, see bug 31994

2008-03-30 Thread pault at gcc dot gnu dot org


--- Comment #4 from pault at gcc dot gnu dot org  2008-03-30 14:14 ---
Subject: Bug 35740

Author: pault
Date: Sun Mar 30 14:13:21 2008
New Revision: 133729

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133729
Log:
2008-03-30  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/35740
* resolve.c (resolve_function, resolve_call): If the procedure
is elemental do not look for noncopying intrinsics.

2008-03-30  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/35740
* gfortran.dg/transpose_conjg_1.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/transpose_conjg_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/35740] a = conjg(transpose(a)) still gives wrong results, see bug 31994

2008-03-29 Thread pault at gcc dot gnu dot org


--- Comment #3 from pault at gcc dot gnu dot org  2008-03-29 07:27 ---
(In reply to comment #2)
Hah!  It's still worse than I thought.  Not only is a temporary not made but
the scalarizer is being blown out of the water by the likes of:

program main
  implicit none
  complex, dimension(2,2) :: a,b,c,d
  a(1,1) = (1.,1.)
  a(2,1) = (2.,2.)
  a(1,2) = (3.,3.)
  a(2,2) = (4.,4.)
  b = a
  c = (0.0,0.0)
  b = conjg(transpose(b + c))
  print *, "H(a) -wrong:   ",b
  b = a
  b = transpose(conjg(b + c))
  print *, "H(a) -   OK:   ",b
  b = a
  d = conjg(transpose(b + c))
  b = d
  print *, "H(a) - really wrong:   ",b
 END program main

Paul


-- 


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



[Bug fortran/35740] a = conjg(transpose(a)) still gives wrong results, see bug 31994

2008-03-28 Thread pault at gcc dot gnu dot org


--- Comment #2 from pault at gcc dot gnu dot org  2008-03-29 06:38 ---
(In reply to comment #1)
> Confirm. There seems to be a temporary missing.
> 
> Paul, you have fixed PR 31994, do you have an idea here?

Tobias,

I'll put my thinking cap on.  Our conjg(tranpose()) trick is efficoent, of
course, but it keeps on tripping us up.

Cheers

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2008-03-28 19:58:54 |2008-03-29 06:38:40
   date||


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



[Bug fortran/35740] a = conjg(transpose(a)) still gives wrong results, see bug 31994

2008-03-28 Thread burnus at gcc dot gnu dot org


--- Comment #1 from burnus at gcc dot gnu dot org  2008-03-28 19:58 ---
Confirm. There seems to be a temporary missing.

Paul, you have fixed PR 31994, do you have an idea here?

The problem seems to be in general expressions of this type:

  array = function(transpose(array))

where function() can be, e.g., "sin()" and the data type, e.g., real since then
no temporary is created. If possible, we should backport a fix to 4.2 and 4.3.


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pault at gcc dot gnu dot
   ||org, burnus at gcc dot gnu
   ||dot org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
  GCC build triplet|x86_64-linux-gnu|
   GCC host triplet|x86_64-linux-gnu|
 GCC target triplet|x86_64-linux-gnu|
   Keywords||wrong-code
   Last reconfirmed|-00-00 00:00:00 |2008-03-28 19:58:54
   date||


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



[Bug fortran/35740] a = conjg(transpose(a)) still gives wrong results, see bug 31994

2008-03-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Severity|critical|normal


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