[Openmp-commits] [openmp] r238950 - Remove conditional parameters from KA_TRACE macro.

Jonathan Peyton jonathan.l.peyton at intel.com
Wed Jun 3 11:24:03 PDT 2015


Author: jlpeyton
Date: Wed Jun  3 13:24:02 2015
New Revision: 238950

URL: http://llvm.org/viewvc/llvm-project?rev=238950&view=rev
Log:
Remove conditional parameters from KA_TRACE macro.

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

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=238950&r1=238949&r2=238950&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_tasking.c (original)
+++ openmp/trunk/runtime/src/kmp_tasking.c Wed Jun  3 13:24:02 2015
@@ -1055,15 +1055,18 @@ __kmpc_omp_task_alloc( ident_t *loc_ref,
     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 );





More information about the Openmp-commits mailing list