]> git.ipfire.org Git - thirdparty/gcc.git/commit - libgomp/omp.h.in
openmp: Add alloc_align attribute to omp_aligned_*alloc and testcase for omp_realloc
authorJakub Jelinek <jakub@redhat.com>
Fri, 1 Oct 2021 08:32:10 +0000 (10:32 +0200)
committerJakub Jelinek <jakub@redhat.com>
Fri, 1 Oct 2021 08:32:10 +0000 (10:32 +0200)
commit998e434f8f9ce42842710af9e33c1b9732b22999
tree81ef10d26946e81329f6d0227fb5b3807e04b366
parent701075864ac4d1c6cec936d10f9cfc2aeb8c1699
openmp: Add alloc_align attribute to omp_aligned_*alloc and testcase for omp_realloc

This patch adds alloc_align attribute to omp_aligned_{,c}alloc so that if
the first argument is constant, GCC can assume requested alignment.

Additionally, it adds testsuite coverage for omp_realloc which I haven't
managed to write in the patch from yesterday.

2021-10-01  Jakub Jelinek  <jakub@redhat.com>

* omp.h.in (omp_aligned_alloc, omp_aligned_calloc): Add
__alloc_align__ (1) attribute.
* testsuite/libgomp.c-c++-common/alloc-9.c: New test.
libgomp/omp.h.in
libgomp/testsuite/libgomp.c-c++-common/alloc-9.c [new file with mode: 0644]