The purpose of this patch is to allow converting FIR array representation to memref when possible without hitting memref verifier issue. The issue was that FIR arrays may be assumed size, in which case the last dimension will not be known at runtime. Flang uses -1 to encode this to fulfill Fortran 2023 standard requirements in 18.5.3 point 5 about CFI_desc_t. When arrays are converted to memeref, if this `-1` reaches memeref operations, it triggers verifier errors (even if the conversion happened in code that guards the code to be entered at runtime if the array is assumed-size because folders/verifiers do not take into account reachability). This follows-up on discussions in #163505 merge requests
57 KiB
57 KiB