Bug ID: 30728
           Summary: Cannot build with -DLIBOMP_OMP_VERSION=40
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Runtime Library
    Classification: Unclassified

When building with -DLIBOMP_OMP_VERSION=40 compiler complains that
th_steal_lock and proxy fields are not defined.

A short workaround patch can make this code buildable with

diff --git a/runtime/src/kmp.h b/runtime/src/kmp.h
index eff3c93..18d72a3 100644
--- a/runtime/src/kmp.h
+++ b/runtime/src/kmp.h
@@ -1738,16 +1738,16 @@ typedef struct kmp_disp {

     dispatch_private_info_t *th_disp_buffer;
     kmp_int32                th_disp_index;
+// #if OMP_45_ENABLED
     kmp_int32                th_doacross_buf_idx; // thread's doacross buffer
     volatile kmp_uint32     *th_doacross_flags;   // pointer to shared array
of flags
     union { // we can use union here because doacross cannot be used in
nonmonotonic loops
         kmp_int64           *th_doacross_info;    // info on loop bounds
         kmp_lock_t          *th_steal_lock;       // lock used for chunk
stealing (8-byte variable)
diff --git a/runtime/src/kmp_tasking.c b/runtime/src/kmp_tasking.c
index 0c806c2..089620b 100644
--- a/runtime/src/kmp_tasking.c
+++ b/runtime/src/kmp_tasking.c
@@ -578,7 +578,11 @@ __kmp_free_task_and_ancestors( kmp_int32 gtid,
kmp_taskdata_t * taskdata, kmp_in
     // Proxy tasks must always be allowed to free their parents
     // because they can be run in background even in serial mode.
     kmp_int32 task_serial = taskdata->td_flags.task_serial &&
+    kmp_int32 task_serial = taskdata->td_flags.task_serial;
     KMP_DEBUG_ASSERT( taskdata -> td_flags.tasktype == TASK_EXPLICIT );

     kmp_int32 children = KMP_TEST_THEN_DEC32( (kmp_int32 *)(& taskdata ->
td_allocated_child_tasks) ) - 1;

-    void* dummy_padding[2]; // make it 64 bytes on Intel(R) 64
+// #else
+//    void* dummy_padding[2]; // make it 64 bytes on Intel(R) 64
+// #endif
     char more_padding[INTERNODE_CACHE_LINE];

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to