Apparent regression in gfortran 4.1 and 4.2
Brooks Moses
bmoses@stanford.edu
Wed Aug 2 16:53:00 GMT 2006
Tobias Burnus wrote:
> Martin Reinecke wrote:
>> complex arg1 (:)
>> real, optional :: arg2 (:)
>
>
>> arg1 = arg1 + arg2
>> 1
>>Error: 'arg2' at (1) is an array and OPTIONAL; it cannot therefore be an
>>actual argument of an ELEMENTAL procedure unless there is a non-optional
>>argument with the same rank (12.4.1.5)
>>
>>Is this code really ill-formed? If yes, how would it be written correctly?
>>If it is a gfortran bug, please let me know and I'll open a PR.
>
> This seems to be a bug in gfortran as both arrays have the same rank
> (namely one).
Also worth noting is that the procedure, as shown in the original post,
is not in fact an ELEMENTAL procedure, despite what the error claims.
- Brooks
More information about the Fortran
mailing list