------- Comment #3 from dfranke at gcc dot gnu dot org  2010-05-16 20:17 -------
The simplifiers show the same behaviour:

$> cat pr44156.f90
program main
  implicit none
  real, dimension(1), parameter :: a = -1.0, b = 0.0
  real, dimension(1,1), parameter :: aa = -1.0, bb = 0.0

  real, dimension(1), parameter :: c = dot_product(a,b)
  real, dimension(1,1), parameter :: d = matmul(aa, bb)
  real, parameter :: e = a(1) * b(1)

  print *, c, d, e
end program main

$ gfortran-svn -Wall -W pr44156.f90 && ./a.out 
   0.0000000       0.0000000      -0.0000000

The dump has:
MAIN__ ()
{
  static real(kind=4) c[1] = {};
  static real(kind=4) d[1] = {0.0};
  [writes snipped]
      {
      static real(kind=4) C.1525 = -0.0;

      _gfortran_transfer_real (&dt_parm.0, &C.1525, 4);
    }
}


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org


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

Reply via email to