[Bug libgomp/105745] [12/13 Regression] Conditional OpenMP directive fails with GCC 12
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat May 28 06:33:09 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105745
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:42fd2cd932384288914174f4af7974a060972bff
commit r13-808-g42fd2cd932384288914174f4af7974a060972bff
Author: Jakub Jelinek <jakub@redhat.com>
Date: Sat May 28 08:30:47 2022 +0200
libgomp: Don't define GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC for _aligned_malloc
[PR105745]
since apparently _aligned_malloc requires freeing with _aligned_free and:
/* Defined if gomp_aligned_alloc doesn't use fallback version
and free can be used instead of gomp_aligned_free. */
#define GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC 1
so the second condition isn't satisfied. For uses inside of the OpenMP
allocators we can still use _aligned_malloc but we need to call
_aligned_free
in gomp_aligned_free.
2022-05-28 Jakub Jelinek <jakub@redhat.com>
PR libgomp/105745
* libgomp.h (GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC): Don't define for
defined(HAVE__ALIGNED_MALLOC) case.
* alloc.c (gomp_aligned_alloc): Move defined(HAVE__ALIGNED_MALLOC)
handling as last option before fallback instead of first.
(gomp_aligned_free): For defined(HAVE__ALIGNED_MALLOC) call
_aligned_free.
More information about the Gcc-bugs
mailing list