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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
Janne,

Can you be a little more specific on what you want
to investigate?  AFAIK, the general handling of 
complex division is done be the middle-end. 

% cat l.f90
subroutine loo(z1,z2,z3)
   complex z1, z2, z3
   z3 = z1 / z2
end subroutine loo
% gfc4x -fdump-tree-all -c l.f90
% ls l.f90.*
l.f90.003t.original             l.f90.018t.einline
l.f90.004t.gimple               l.f90.033t.profile_estimate
l.f90.006t.omplower             l.f90.036t.release_ssa
l.f90.007t.lower                l.f90.037t.inline_param2
l.f90.010t.eh                   l.f90.161t.veclower
l.f90.011t.cfg                  l.f90.162t.cplxlower0
l.f90.015t.ssa                  l.f90.169t.optimized
l.f90.017t.inline_param1        l.f90.249t.statistics

l.f90.cplxlower0 is definitely coming from the
middle-end.

The Fortran front-end will perform constant-folding.

% cat k.f90
subroutine lu(z)
  complex z
  complex, parameter :: a = (1,2), b=(3,4)
  z = a/b
end subroutine lu
% cat k.f90.003t.original 
lu (complex(kind=4) & restrict z)
{
  *z=__complex__(4.39999997615814208984375e-1,7.999999821186065673828125e-2);
}

Note, the front-end takes advantage of MPFR to do the folding, and so
it should yield an accurate result.

Reply via email to