This is an archive of the discontinued LLVM Phabricator instance.

[flang] Parenthesize RHS arguments to defined assignments (bug #62599)
ClosedPublic

Authored by klausler on May 10 2023, 4:53 PM.

Details

Summary

The right-hand sides of assignment statements are always expressions,
never variables. When an assignment statement is converted into a call
to a defined assignment subroutine, and the actual argument being associated
with the second dummy argument is a variable, and the dummy argument does
not have the VALUE attribute, wrap it with parentheses so that lowering
will pass it by means of a temporary.

Fixes https://github.com/llvm/llvm-project/issues/62599.

Diff Detail

Event Timeline

klausler created this revision.May 10 2023, 4:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2023, 4:53 PM
klausler requested review of this revision.May 10 2023, 4:53 PM
This revision is now accepted and ready to land.May 11 2023, 12:34 AM