[all-commits] [llvm/llvm-project] 2780c2: [flang] Emit error on impossible-to-implement cons...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Tue Sep 30 10:35:03 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2780c209e1e242fd9e7d71045f88fe4e824cee20
https://github.com/llvm/llvm-project/commit/2780c209e1e242fd9e7d71045f88fe4e824cee20
Author: Peter Klausler <pklausler at nvidia.com>
Date: 2025-09-30 (Tue, 30 Sep 2025)
Changed paths:
M flang/docs/Extensions.md
M flang/lib/Semantics/assignment.cpp
A flang/test/Semantics/bug133669.f90
Log Message:
-----------
[flang] Emit error on impossible-to-implement construct (#160384)
An assignment to a whole polymorphic allocatable changes its dynamic
type to the type of the right-hand side expression. But when the
assignment is under control of a WHERE statement, or a FORALL / DO
CONCURRENT with a mask expression, there is no interpretation of the
assignment, as the type of a variable must be the same for all of its
elements.
There is no restriction in the standard against this usage, and no other
Fortran compiler complains about it. But it is not possible to implement
it in general, and the behavior produced by other compilers is not
reasonable, much less worthy of emulating. It's best to simply disallow
it with an error message.
Fixes https://github.com/llvm/llvm-project/issues/133669, or more
accurately, resolves it.
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