From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 03A813858C98; Mon, 12 Feb 2024 13:00:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03A813858C98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707742842; bh=8opKhJiBR+9y0M2QyVubgaRs/yAu8SaN3AMIM5n0Mmg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sMT63uJS0rUG2NwbiHDc1ERQpCsF5XElOo8Yxv2Q8Uxxmooso1RcKMaa9C8sxXN47 MlY29ojiSDf2vqYqolWS/Q+fyE7PIY28ZeQxqGgK+dCAS1EftU/RG2FxsiMXGnv6hk hp0HAtY+W/sI4K+6MMTg8Zmx26GE6oZUNQZaa74U= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/113867] [14 Regression][OpenMP] Wrong code with mapping pointers in structs Date: Mon, 12 Feb 2024 13:00:41 +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: 14.0 X-Bugzilla-Keywords: openmp, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: burnus at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113867 --- Comment #3 from Tobias Burnus --- Created attachment 57398 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57398&action=3Dedit Patch - handling the libgomp issue Possible patch - lightly tested. This fixes the issue in libgomp. While always correct and possibly avoiding other corner cases (if there are any), an alternative approach is to not create those 'struct: s [len: 1]' + 'alloc:s2.p [len: 0]'. RFC: - Is there a reason why we want to have the struct in such a case? (GCC <=3D 13 doesn't create this struct) - Do we want to have this libgomp change even when not generating the struct as extra safety net?=