[all-commits] [llvm/llvm-project] 83b0d0: [flang] fulfill -Msave/-fno-automatic in main prog...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue Mar 15 01:34:43 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 83b0d0f964c0b50d452982e0362c7cbe44a51ad7
      https://github.com/llvm/llvm-project/commit/83b0d0f964c0b50d452982e0362c7cbe44a51ad7
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2022-03-15 (Tue, 15 Mar 2022)

  Changed paths:
    M flang/lib/Evaluate/tools.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list