Transposed array as actual argument
N.M. Maclaren
nmm1@cam.ac.uk
Sun Aug 22 17:21:00 GMT 2010
On Aug 22 2010, Mikael Morin wrote:
>Le 22.08.2010 18:16, Tobias Burnus a écrit :
>>
>>> For example, I expect the following code to output four ones.
>>> [...]
>>> The output is four twos. Is that correct ?
>>> If not I will open a PR for it.
>>
>> Other compilers give [1 1 1 1] - however, I belief that both results are
>> correct as the the argument is not definable. If you use INTENT(INOUT)
>> you will get the error message:
>>
>> Error: Actual argument at (1) must be definable as the dummy argument
>> 'b' is INTENT = OUT/INOUT
>>
>Thanks for your answer.
>Unfortunately it means more work for me :-(
Why? As it's undefined behaviour, you are entitled to return anything
you like - e.g. 97 61 13 7, except on alternate Thursdays, when you return
1 2 3 4. Just leave your code if you don't want to issue an error message.
Or is that what you meant?
Regards,
Nick Maclaren.
More information about the Fortran
mailing list