You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The expected output is 1 5, but the actual output is 1 1. This is because p is passed by reference, but also set as the result location; so, the first field assignment mutates it in-place. This is not expected or desired behaviour. To avoid this, when the result location would overlap any argument, we should instead allocate a temporary.
The text was updated successfully, but these errors were encountered:
Noticed by sinitax on Discord.
Consider the following code:
The expected output is
1 5
, but the actual output is1 1
. This is becausep
is passed by reference, but also set as the result location; so, the first field assignment mutates it in-place. This is not expected or desired behaviour. To avoid this, when the result location would overlap any argument, we should instead allocate a temporary.The text was updated successfully, but these errors were encountered: