newbie willing to contribute...

Steve Kargl sgk@troutmask.apl.washington.edu
Mon Nov 7 15:47:00 GMT 2005


On Mon, Nov 07, 2005 at 04:29:57PM +0100, Pierre-Matthieu anglade wrote:
> On 11/7/05, Steve Kargl <sgk@troutmask.apl.washington.edu> wrote:
> 
> > I would need to see your patch, but I suspect that
> > you forgot to call make_generic(complex) in intrinsic.c
> > after you've added it to the list of intrinsics.
> 
> I did

Guess who else has forgotten make_generic()?

> > Or,
> > your iresolve.c change is not mapping to the right
> > function.
> 
> Well do'nt know. I wrote the following:
> gfc_resolve_complex (gfc_expr * f, gfc_expr * x, gfc_expr * y)
> {
>   int kind;
>   kind = x->ts.kind;
>   gfc_resolve_cmplx (f, x, y, gfc_int_expr (kind));
> }

This is almost correct IMHO.  In pseudo-code you need

   if (x is real AND y is real)
      kind = max(kind(x), kind(y))
      make kinds of x and y match kind.
   else if (x is real)  /* y is integer */
      kind = kind(x)
      y is converted to type and kind of x
   else if (y is real)  /* x is integer */
      kind = kind(y)
      x is converted to type and kind of y
   else /* both are integer */
      kind = default real kind
      convert x and y to default real kind
   end 

   gfc_resolve_cmplx ()
    
> 
> May be I need a full rebuild, not just a "make" ?
> 

For the initial build, do a "make bootstrap".  After
a small change in gcc/fortran, you can do a "make bubblestrap".

-- 
Steve



More information about the Fortran mailing list