[flang] Rewrite "1*j" to "(j)", not "j", when j is a variable
Expression folding currently unconditionally rewrites "1*j" to "j", which is wrong when "j" is a variable, as it transforms an expression into a variable and can lead to incorrect associations in contexts like an actual argument or an ASSOCIATE selector. Transform "1*j" to a parenthesized "(j)" when "j" is a variable. Fixes LLVM bug https://github.com/llvm/llvm-project/issues/63259. Differential Revision: https://reviews.llvm.org/D153457
parent
73a0ae02
Please register or sign in to comment