[Openmp-commits] [PATCH] D51301: [OpenMP][Fix] Ensure comparison between unsigned values.

Gheorghe-Teodor Bercea via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 27 07:07:41 PDT 2018


gtbercea created this revision.
gtbercea added reviewers: ABataev, Hahnfeld, caomhin, grokos.
Herald added subscribers: openmp-commits, guansong.

Ensure the values being compared are both unsigned.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D51301

Files:
  runtime/src/kmp_gsupport.cpp


Index: runtime/src/kmp_gsupport.cpp
===================================================================
--- runtime/src/kmp_gsupport.cpp
+++ runtime/src/kmp_gsupport.cpp
@@ -1001,7 +1001,7 @@
           KMP_DISPATCH_NEXT_ULL(&loc, gtid, NULL, (kmp_uint64 *)p_lb,          \
                                 (kmp_uint64 *)p_ub, (kmp_int64 *)&stride);     \
       if (status) {                                                            \
-        KMP_DEBUG_ASSERT((long long)stride == str);                            \
+        KMP_DEBUG_ASSERT((unsigned long long)stride == str);                   \
         *p_ub += (str > 0) ? 1 : -1;                                           \
       }                                                                        \
     } else {                                                                   \


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51301.162671.patch
Type: text/x-patch
Size: 848 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180827/d0efbeba/attachment.bin>


More information about the Openmp-commits mailing list