[flang-commits] [flang] [flang][runtime] Prepare enabling PRINT of integer32 for device. (PR #86247)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Thu Mar 21 22:20:37 PDT 2024


================
@@ -10,14 +10,17 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "tools.h"
-
-#if !defined(RT_USE_PSEUDO_FILE_UNIT)
-
 #include "io-error.h"
 #include "lock.h"
+#include "tools.h"
 #include "unit-map.h"
 #include "unit.h"
+
+// NOTE: the header files above may define OpenMP declare target
+// variables, so they have to be included unconditionally
+// so that the offload entries are consistent between host and device.
+#if !defined(RT_USE_PSEUDO_FILE_UNIT)
----------------
vzakhari wrote:

Note that I had to hoist the include directives above.  I hope the comment explains it well.

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


More information about the flang-commits mailing list