[all-commits] [llvm/llvm-project] b707fd: [flang] Retrieve shape from selector when generati...
Kareem Ergawy via All-commits
all-commits at lists.llvm.org
Wed May 28 02:09:02 PDT 2025
Branch: refs/heads/users/ergawy/gen_shape_from_expr_for_assoc_entities
Home: https://github.com/llvm/llvm-project
Commit: b707fd59ee81e0b5f2a52c1f4a018ae21fcc53ba
https://github.com/llvm/llvm-project/commit/b707fd59ee81e0b5f2a52c1f4a018ae21fcc53ba
Author: ergawy <kareem.ergawy at amd.com>
Date: 2025-05-28 (Wed, 28 May 2025)
Changed paths:
M flang/lib/Lower/ConvertType.cpp
A flang/test/Lower/do_concurrent_local_assoc_entity.f90
Log Message:
-----------
[flang] Retrieve shape from selector when generating assoc sym type
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.
Commit: dde0225506a090c701e2ab98c1ee5837cb5ba61b
https://github.com/llvm/llvm-project/commit/dde0225506a090c701e2ab98c1ee5837cb5ba61b
Author: ergawy <kareem.ergawy at amd.com>
Date: 2025-05-28 (Wed, 28 May 2025)
Changed paths:
M flang/lib/Lower/ConvertType.cpp
M flang/test/Lower/do_concurrent_local_assoc_entity.f90
Log Message:
-----------
review comment, restructure code
Compare: https://github.com/llvm/llvm-project/compare/621169618ac3...dde0225506a0
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list