[flang-commits] [flang] [llvm] [flang][MIF] Adding Stop and ErrorStop operations (PR #166787)

Dan Bonachea via flang-commits flang-commits at lists.llvm.org
Mon Dec 15 20:23:10 PST 2025


================
@@ -112,6 +113,9 @@ class Terminator {
   else \
     Terminator{__FILE__, __LINE__}.CheckFailed(#pred)
 
+static void (*normalEndCallback)(void) = nullptr;
+static void (*failImageCallback)(void) = nullptr;
+static void (*errorCallback)(void) = nullptr;
----------------
bonachea wrote:

These appear to be declared as `static` global variables in a header file, which IIUC means each .cpp file that includes this header will have a _different_ copy of these variables, which is almost certainly not what you want.

Am I missing something here?
Did you mean to declare these as static data inside a `class`?

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


More information about the flang-commits mailing list