do we expect compiler to catch this?

Paul Thomas paulthomas2@wanadoo.fr
Thu Nov 17 21:18:00 GMT 2005


Brooks Moses wrote:

> Tobias.Schlueter@Physik.Uni-Muenchen.DE wrote:
>
>> This is a quality of implementation issue, not than a correctness 
>> issue.  It
>> would be great if we caught this, but we don't have to.  On the other 
>> hand,
>> with an explicit interface (as in the case of an intrinsic), we 
>> should probably
>> catch this.  Which we don't:
>> schluter@pcl247d:~/src> cat t.f90
>> CALL f(1.)
>> CONTAINS
>> subroutine f(x)
>>  intent(out) :: x
>>  x = 2.
>> end subroutine f
>> end
>
>
> That's an internal, not an intrinsic.  :)
>
> (However, intrinsics, like internals, do have explicit interfaces.)
>
> - Brooks

This we absolutely should catch on an internal; there is no excuse, 
since the argument is available to compare its intent against the 
constantness of the actual.

Paul



More information about the Fortran mailing list