[flang-commits] [flang] [flang] Fix incorrect offset for zero-size COMMON block members. (PR #214174)
Daniel Chen via flang-commits
flang-commits at lists.llvm.org
Wed Aug 5 12:56:55 PDT 2026
DanielCChen wrote:
As for the unaligned COMMON block variables, Fortran standard doesn't have an explicit rule to enforce it either way, so it is processor-dependent.
Each vendor, however, has quite different default behavior in terms of alignment rules for COMMON block variables.
- `gfortran`: enforce alignment by default, and has option`-fno-align-commons` to turn it off.
- `ifx/ifort`: no alignment by default, and has`-align (no)commons, -align (no)dcommons` to enable or disable it.
- `IBM XLF`: no alignment by default, and has no option to toggle it.
- `flang`: seems inconsistent before the fix of this PR. I will break it down in in response to each test scenario.
https://github.com/llvm/llvm-project/pull/214174
More information about the flang-commits
mailing list