[flang-commits] [clang] [flang] [flang][driver] add option to make all main program variable static (PR #121968)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Tue Jan 7 09:45:31 PST 2025


================
@@ -6945,6 +6945,9 @@ defm unsigned : OptInFC1FFlag<"unsigned", "Enables UNSIGNED type">;
 def fno_automatic : Flag<["-"], "fno-automatic">, Group<f_Group>,
   HelpText<"Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE">;
 
+def fsave_main_program : Flag<["-"], "fsave-main-program">, Group<f_Group>,
+  HelpText<"Place all variables from the main program in static memory (otherwise scalar may be placed on the stack)">;
----------------
kiranchandramohan wrote:

```suggestion
  HelpText<"Place all variables from the main program in static memory (otherwise scalars may be placed on the stack)">;
```

https://github.com/llvm/llvm-project/pull/121968


More information about the flang-commits mailing list