From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4B8393839C67; Mon, 30 May 2022 03:37:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B8393839C67 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/105745] [12/13 Regression] Conditional OpenMP directive fails with GCC 12 Date: Mon, 30 May 2022 03:36:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2022 03:37:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105745 --- Comment #12 from CVS Commits --- The releases/gcc-12 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:93e60642891abc85af7a2efb2b7095062e10719f commit r12-8435-g93e60642891abc85af7a2efb2b7095062e10719f Author: Jakub Jelinek Date: Sat May 28 08:30:47 2022 +0200 libgomp: Don't define GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC for _aligned_ma= lloc [PR105745] since apparently _aligned_malloc requires freeing with _aligned_free an= d: /* 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 PR libgomp/105745 * libgomp.h (GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC): Don't define f= or defined(HAVE__ALIGNED_MALLOC) case. * alloc.c (gomp_aligned_alloc): Move defined(HAVE__ALIGNED_MALL= OC) handling as last option before fallback instead of first. (gomp_aligned_free): For defined(HAVE__ALIGNED_MALLOC) call _aligned_free. (cherry picked from commit 42fd2cd932384288914174f4af7974a060972bff)=