[Openmp-commits] [openmp] r240972 - Remove use of assignment to multiple struct fields using .fieldname (OMPT)

Jonathan Peyton jonathan.l.peyton at intel.com
Mon Jun 29 10:33:03 PDT 2015


Author: jlpeyton
Date: Mon Jun 29 12:33:03 2015
New Revision: 240972

URL: http://llvm.org/viewvc/llvm-project?rev=240972&view=rev
Log:
Remove use of assignment to multiple struct fields using .fieldname (OMPT)

Remove use of assignment to multiple struct fields using .fieldname syntax. 
This doesn't work with gcc 4.8 and earlier.  Replace with elementwise field assignments.

Patch by John Mellor-Crummey

Differential Revision: http://reviews.llvm.org/D10798

Modified:
    openmp/trunk/runtime/src/kmp_tasking.c

Modified: openmp/trunk/runtime/src/kmp_tasking.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_tasking.c?rev=240972&r1=240971&r2=240972&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_tasking.c (original)
+++ openmp/trunk/runtime/src/kmp_tasking.c Mon Jun 29 12:33:03 2015
@@ -758,10 +758,8 @@ __kmp_task_init_ompt( kmp_taskdata_t * t
 {
     task->ompt_task_info.task_id = __ompt_task_id_new(tid);
     task->ompt_task_info.function = NULL;
-    task->ompt_task_info.frame = (ompt_frame_t) {
-        .exit_runtime_frame = NULL,
-        .reenter_runtime_frame = NULL
-    };
+    task->ompt_task_info.frame.exit_runtime_frame = NULL;
+    task->ompt_task_info.frame.reenter_runtime_frame = NULL;
 }
 #endif
 
@@ -1035,8 +1033,8 @@ __kmp_task_alloc( ident_t *loc_ref, kmp_
     if (ompt_status & ompt_status_track) {
         taskdata->ompt_task_info.task_id = __ompt_task_id_new(gtid);
         taskdata->ompt_task_info.function = (void*) task_entry;
-        taskdata->ompt_task_info.frame = (ompt_frame_t)
-            { .exit_runtime_frame = NULL, .reenter_runtime_frame = NULL };
+        taskdata->ompt_task_info.frame.exit_runtime_frame = NULL; 
+        taskdata->ompt_task_info.frame.reenter_runtime_frame = NULL;
     }
 #endif
 





More information about the Openmp-commits mailing list