This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fortran, patch] clean out elemental status of intrinsic subroutines/functions
- From: Daniel Franke <franke dot daniel at gmail dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Janne Blomqvist <blomqvist dot janne at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 30 Apr 2007 22:19:22 +0200
- Subject: Re: [fortran, patch] clean out elemental status of intrinsic subroutines/functions
- References: <200704302132.40217.franke.daniel@gmail.com> <46364E2E.4080209@gmail.com>
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.