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: [fortran, patch] clean out elemental status of intrinsic subroutines/functions


On Mon, Apr 30, 2007 at 10:19:22PM +0200, Daniel Franke wrote:
> On Monday 30 April 2007 22:14:38 Janne Blomqvist wrote:
> > Daniel Franke wrote:
> > > PR31760 reported, that some intrinsics were not available as elemental,
> > > although they were documented as such. To make sure that there are no
> > > more occurences of this problem than those already known (BESXY and ERF),
> > > I checked the declarations of the intrinsics in intrinsic.c. I found 15
> > > marked as ELEMENTAL that are actually not (1 in F95, 14 GNU Extensions),
> > > but none marked NOT_ELEMENTAL that should be elemental.
> >
> > I believe random_number should be elemental. Code like
> >
> > real :: a(1000)
> > call random_number(a)
> >
> > is perfectly allowed.
> 
> The standard says otherwise.
> 
> F95, 13.14.85 RANDOM_NUMBER
> Class. Subroutine.
> 
> F2003, 13.7.94 RANDOM NUMBER
> Class. Subroutine.

The *only* elemental subroutine is MVBITS.  OTOH, RANDOM_NUMBER
accepts both scalar and array arguments.

-- 
Steve


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