openmp: omp_alloc(0, ...) should return NULL.
authorJakub Jelinek <jakub@redhat.com>
Sat, 30 May 2020 12:02:56 +0000 (14:02 +0200)
committerJakub Jelinek <jakub@redhat.com>
Sat, 30 May 2020 12:02:56 +0000 (14:02 +0200)
commit05e4db63d044ee235d2fbfab8b0bb9fbdfb18315
tree9fced1a49c8dd58c725d9c8a5bcf98164da2b830
parent850533ab160ef40eccfd039e1e3b138cf26e76b8
openmp: omp_alloc(0, ...) should return NULL.

2020-05-30  Jakub Jelinek  <jakub@redhat.com>

* allocator.c (omp_alloc): For size == 0, return NULL early.

* testsuite/libgomp.c-c++-common/alloc-4.c: New test.
libgomp/allocator.c
libgomp/testsuite/libgomp.c-c++-common/alloc-4.c [new file with mode: 0644]