From da7c8ab5a661b7cf775f1aabe05faee4ef91f7e9 Mon Sep 17 00:00:00 2001 From: Jonathan Peyton Date: Mon, 29 Jun 2015 17:33:03 +0000 Subject: 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 llvm-svn: 240972 --- openmp/runtime/src/kmp_tasking.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'openmp/runtime/src') diff --git a/openmp/runtime/src/kmp_tasking.c b/openmp/runtime/src/kmp_tasking.c index b43bf1e3068..d1a94f690aa 100644 --- a/openmp/runtime/src/kmp_tasking.c +++ b/openmp/runtime/src/kmp_tasking.c @@ -758,10 +758,8 @@ __kmp_task_init_ompt( kmp_taskdata_t * task, int tid ) { 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_int32 gtid, kmp_tasking_flags_t *flags, 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 -- cgit v1.2.3