[flang-commits] [flang] [flang][Lower] Implement lowering for new expression kind used in explicit-shape-bounds-spec (PR #215403)
via flang-commits
flang-commits at lists.llvm.org
Wed Oct 14 01:13:11 PDT 2026
================
@@ -0,0 +1,37 @@
+! Verify that an explicit-shape array bound which survives folding as a rank-1
+! bound element round-trips through a mod file read back by a *separate*
+! compilation. Such an element arises for a rank-1 array bound that cannot be
+! reduced to a plain scalar reference (here the elemental intrinsic merge() has
+! a LOGICAL mask argument, which the reducer does not distribute into). It has
+! no Fortran surface syntax, so it is serialized through its UBOUND()/LBOUND()
+! provenance as a real ubound(a,dim)/lbound(a,dim) call: the mod file holds that
----------------
MattPD wrote:
As far as I can tell, the test provider never writes a provenance call. Because `a` has nonconstant lower bounds, the module file keeps three original inquiries: `lbound(a,1_4)`, `ubound(a,2_4)`, and `size(a,2_4)`. The test also does not inspect the module file for `%ROBE`. Would it make sense to add separately compiled cases that write `ubound(a,dim=...,kind=8)`?
https://github.com/llvm/llvm-project/pull/215403
More information about the flang-commits
mailing list