Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix in-intent inside on-statements #22760

Merged
merged 2 commits into from
Jul 19, 2023
Merged

Conversation

benharsh
Copy link
Member

@benharsh benharsh commented Jul 17, 2023

This PR fixes a bug where in-intents were not being implemented for calls inside of on-statements. The function checkAnotherFunctionsFormal was created to fix a particular issue with follower-related code, where it was important to ignore in-intents (see #13300). The function checked whether the argument to the call was defined in the same function as the call itself, and if it wasn't, would tell resolution to not implement in intent copies for that argument. This would inherently apply to all nested functions, which include our representation of on-statements at this stage of the compiler. The solution is to check whether the nested function is a follower function, and if not, skip the rest of the logic.

The .future test multilocale/bharshbarg/onStmtInIntent.chpl was introduced in #22747 and demonstrates the bug. This PR retires that .future.

Testing:

  • local
  • no-local
  • local memleaks
  • gasnet
  • gasnet memleaks

@benharsh benharsh merged commit 40eae16 into chapel-lang:main Jul 19, 2023
7 checks passed
@benharsh benharsh deleted the in-intent-fix branch April 9, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants