[flang-commits] [flang] [flang][CUDA] Preserve data attrs on assignment RHS (PR #207849)

via flang-commits flang-commits at lists.llvm.org
Thu Jul 9 02:45:33 PDT 2026


jeanPerier wrote:

> I don't see any parenthesized variable in this PR. I'm missing something?

Semantic is adding the parenthesis around the RHS when building the procedure ref for a user defined assignment (`lhs = rhs` gives `foo(lhs, (rhs))`). This is what the standard describes in F2023 15.4.3.4.3 defined assignments:

_A defined assignment is treated as a reference to the subroutine, with the left-hand side as the first argument and the right-hand side enclosed in parentheses as the second argument. All restrictions and constraints that apply to actual arguments in a reference to the subroutine also apply to the left-hand-side and to the right-hand-side enclosed in parentheses as if they were used as actual arguments._

https://github.com/llvm/llvm-project/pull/207849


More information about the flang-commits mailing list