llvm-project
fd66fa56 - [flang] Retrieve shape from selector when generating assoc sym type (#137117)

Commit
120 days ago
[flang] Retrieve shape from selector when generating assoc sym type (#137117) This PR extends `genSymbolType` so that the type of an associating symbol carries the shape of the selector expression, if any. This is a fix for a bug that triggered when an associating symbol is used in a locality specifier. For example, given the following input: ```fortran associate(a => aa(4:)) do concurrent (i = 4:11) local(a) a(i) = 0 end do end associate ``` before the changes in the PR, flang would assert that we are casting between incompatible types. The issue happened since for the associating symbol (`a`), flang generated its type as `f32` rather than `!fir.array<8xf32>` as it should be in this case.
Author
Parents
Loading