[all-commits] [llvm/llvm-project] 49dad1: [flang] Ignore -fno-realloc-lhs for polymorphic al...
Eugene Epshteyn via All-commits
all-commits at lists.llvm.org
Thu Apr 23 06:34:34 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 49dad1672430134e44e7831012cbeb06bebf32b7
https://github.com/llvm/llvm-project/commit/49dad1672430134e44e7831012cbeb06bebf32b7
Author: Eugene Epshteyn <eepshteyn at nvidia.com>
Date: 2026-04-23 (Thu, 23 Apr 2026)
Changed paths:
M flang/include/flang/Support/Fortran-features.h
M flang/include/flang/Support/LangOptions.def
M flang/lib/Frontend/CompilerInvocation.cpp
M flang/lib/Lower/Bridge.cpp
M flang/lib/Semantics/expression.cpp
M flang/lib/Support/Fortran-features.cpp
M flang/test/Lower/reallocate-lhs.f90
A flang/test/Semantics/no-realloc-lhs-poly.f90
Log Message:
-----------
[flang] Ignore -fno-realloc-lhs for polymorphic allocatable LHS with warning (#192697)
When -fno-realloc-lhs is specified and the LHS of an assignment is a
polymorphic allocatable (class(*) or class(T)), reallocation semantics
are required by the Fortran 2003 standard for dynamic type tracking and
cannot be safely skipped. Previously, the compiler generated invalid FIR
in such cases (type mismatch between i32 and
!fir.class<!fir.heap<none>>), causing a compilation error.
With this change, when -fno-realloc-lhs is in effect and a polymorphic
allocatable LHS is detected, the compiler emits a warning that the
option is being ignored for that assignment and proceeds with
reallocation semantics.
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