This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] more g77 runtime library functions for gfortran


On Wed, Aug 18, 2004 at 10:22:09PM +0100, Paul Brook wrote:
> On Wednesday 18 August 2004 21:53, Steve Kargl wrote:
> > On Wed, Aug 18, 2004 at 02:07:45AM +0100, Paul Brook wrote:
> > >
> > > 3) The parameters to the library functions should be passed by value, not
> > > by reference.
> >
> > I have no idea what you want here.
> 
> You declare the library functions as
> besj0 (GFC_REAL_4 *x)
> It would be much more efficient to use
> besj0 (GFC_REAL_4 x)

This much I know.

> All the arguments are intent(in), so there's no reason to pass them by 
> reference. Obviously this will need corresponding code in trans-intrinsic.c.

This is where I have no idea what to do.  It appears you want

    case GFC_ISYM_BESJ0:
    case GFC_ISYM_BESJ1:
    case GFC_ISYM_BESY0:
    case GFC_ISYM_BESY1:
      gfc_conv_intrinsic_besj0 (se, expr);
      break;
    case GFC_ISYM_BESJN:
    case GFC_ISYM_BESYN:
      gfc_conv_intrinsic_besjn (se, expr);
      break;

void gfc_conv_intrinsic_bessel (se, expr)
{
   /* Now what do I do? */
}


> > > 5) I don't think a warning/error is the correct behaviour for --std=f95.
> > > Wouldn't it be better to disable the intrinsic altogether? A warning may
> > > be a good idea, but it's not what I'd expect in strict standard compliant
> > > mode.

For now, I'll remove the warning/error messages and start to
think about how to re-implement intrinsics.c.  I'm sure it
will be evil.

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]