llvm-project
d21534f4 - [flang][volatile] Get volatility of designators from base instead of component symbol (#138611)

Commit
147 days ago
[flang][volatile] Get volatility of designators from base instead of component symbol (#138611) The standard says in [8.5.20 VOLATILE attribute]: If an object has the VOLATILE attribute, then all of its sub-objects also have the VOLATILE attribute. This code takes this into account and uses the volatility of the base of the designator instead of that of the component. In fact, fields in a structure are not allowed to have the volatile attribute. So given the code, `A%B => t`, symbol `B` could never directly have the volatile attribute, and the volatility of `A` indicates the volatility of `B`. This PR should address [the comments](https://github.com/llvm/llvm-project/pull/132486#issuecomment-2851313119) on this PR #132486
Author
Parents
Loading