F95, 7.1.5, Conformability rules for elemental operations
"An elemental operation is an intrinsic operation or a defined elemental
operation. Two entities are in shape conformance if both are arrays of the same
shape, or one or both are scalars."

Thus, for bes[jy]n the following should be allowed:
 1. n scalar, x scalar
 2. n array,  x scalar
 3. n scalar, x array
 4. n array,  x array  (arrays of same shape)

$> cat besxy.f90
real :: x(2)
integer :: n(2)
x = besjn(n, x)
end

$>gfortran-svn besxy.f90
besxy.f90:3.10:

x = besjn(n, x)
         1
Error: 'ncopies' argument of 'besjn' intrinsic at (1) must be a scalar


In addition, the name of the dummy argument N should not be NCOPIES.


-- 
           Summary: bes[jy]n intrinsics do not follow definition of
                    elemental functions
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dfranke at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31930

Reply via email to