Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] fulfill -Msave/-fno-automatic in main programs too
`semantics::IsSaved()` was not applying -Msave/-fno-automatic for main programs. This caused issues since lowering relies on it to allocate static variables. This did not match nvfortran/gfortran behaviors where -fno-automatic/-Msave control the static allocation of scalars in main programs. Some program may rely on main program scalars to be statically allocated in bss (and therefore initialized to zero) with -Msave/-fno-automatic flags. Differential Revision: https://reviews.llvm.org/D121603
- Loading branch information