This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: complex division alogrithm?
On Friday 07 May 2004 21:44, Toon Moene wrote:
> Paul Brook wrote:
> > On Friday 07 May 2004 20:15, Toon Moene wrote:
> >>Are you sure we have to do this in the Fortran frontend ? Can't we just
> >>hand complex division as a GENERIC expression to be expanded by GIMPLE ?
> >
> > We need to do constant folding in the frontend. Actual runtime division
> > is left for the GENERIC/GIMPLE to figure out.
>
> Well, strictly speaking, we "do not have to do constant folding" in the
> frontend. There's nothing in the Fortran Standard(s) that requires
> this. We only want to do this because it is improves run times.
It is not explicity required, however it is required in practice for
initialization expressions. Consider as an artificial example:
integer (kind=int((11, 6)/(1, 1))) :: i
Paul