Remove conditional parameters from KA_TRACE macro.
authorJonathan Peyton <jonathan.l.peyton@intel.com>
Wed, 3 Jun 2015 18:24:02 +0000 (18:24 +0000)
committerJonathan Peyton <jonathan.l.peyton@intel.com>
Wed, 3 Jun 2015 18:24:02 +0000 (18:24 +0000)
It's undefined behavior to have arguments to macros be conditionally preprocessed.
http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-June/000669.html

Patch by Jack Howarth and Jonathan Peyton

llvm-svn: 238950

openmp/runtime/src/kmp_tasking.c

index 028ffcb..e6f72a1 100644 (file)
@@ -1055,15 +1055,18 @@ __kmpc_omp_task_alloc( ident_t *loc_ref, kmp_int32 gtid, kmp_int32 flags,
     input_flags->native = FALSE;
     // __kmp_task_alloc() sets up all other runtime flags
 
+#if OMP_41_ENABLED
     KA_TRACE(10, ("__kmpc_omp_task_alloc(enter): T#%d loc=%p, flags=(%s %s) "
                   "sizeof_task=%ld sizeof_shared=%ld entry=%p\n",
                   gtid, loc_ref, input_flags->tiedness ? "tied  " : "untied",
-#if OMP_41_ENABLED
                   input_flags->proxy ? "proxy" : "",
+                  sizeof_kmp_task_t, sizeof_shareds, task_entry) );
 #else
-                 "",
-#endif
+    KA_TRACE(10, ("__kmpc_omp_task_alloc(enter): T#%d loc=%p, flags=(%s) "
+                  "sizeof_task=%ld sizeof_shared=%ld entry=%p\n",
+                  gtid, loc_ref, input_flags->tiedness ? "tied  " : "untied",
                   sizeof_kmp_task_t, sizeof_shareds, task_entry) );
+#endif
 
     retval = __kmp_task_alloc( loc_ref, gtid, input_flags, sizeof_kmp_task_t,
                                sizeof_shareds, task_entry );