[Openmp-commits] [PATCH] D90971: [OpenMP] Add OpenMP 5.1 omp_realloc function implementation

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Nov 9 06:45:48 PST 2020


AndreyChurbanov added a comment.

In D90971#2382007 <https://reviews.llvm.org/D90971#2382007>, @protze.joachim wrote:

> Can we have tests for ptr = NULL, size=0? Probably just replace alloc and free by these cases and check returned address after each call?

Nice suggestion, agree with it.



================
Comment at: openmp/runtime/src/kmp_alloc.cpp:1585
+  KMP_DEBUG_ASSERT(__kmp_init_serial);
+  KMP_DEBUG_ASSERT(size > 0);
+
----------------
protze.joachim wrote:
> Shouldn't this be after handling size==0?
Actually, the assertion does not make sense at all, because size_t is unsigned.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90971/new/

https://reviews.llvm.org/D90971



More information about the Openmp-commits mailing list