From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 973453858CDB; Wed, 25 Oct 2023 07:07:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 973453858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698217649; bh=LDpjB1s9BiLpqk9KC0cKLOgNmZKcAfDWtA4Pn/DIFJg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=V34N0yZQ8e9VAPxEwSwytkz5HeCeV9wgcGUSiS7E8kcL33KH1It84jesShKji3shq TblrQw+yRI/hmmmvU882XqcejLfFpc3py47uVsSD34Pn7x9EYiH2uwif/fzxMRUNCG leaIjEi720kPRArdoNRaVd41eFLmQ7vQ03ESUdWo= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/104131] ICE in gfc_conv_array_ref, at fortran/trans-array.c:3810 Date: Wed, 25 Oct 2023 07:07:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104131 --- Comment #8 from Tobias Burnus --- (In reply to anlauf from comment #7) > (In reply to Tobias Burnus from comment #6) > > !$omp task detach (x) > > !$omp end task > >=20 > > This seems to be valid. OpenMP mostly only rejects coindexed variables = like: >=20 > Alright, I did not expect this, and no other compiler I have access to > accepts it. On the technical side, a coarray is just a normal variable that is also remotely accessible; I think it is usually just 'malloc'ed but in principle= the coarray library could allocate it also in special memory. There might be some issues when used inside target regions, i.e. on a device with shared memory (page migrations etc.) but, otherwise, there is no real reason to disallow it. Of course, everything related to memory allocation or coindexed access will= not work (in general - at least some special cases will fail). * * * In terms of the OpenMP specification, there is a section "Normative References"; * in OpenMP 5.0, it has: "Fortran 2008 ... their use may result in unspecif= ied behavior ... Coarrays" * in OpenMP 5.1, there are no exceptions for 2008 and Fortran 2018 with a n= ew list of unspecified behavior was added. Thus, coarrays were never explicitly rejected but in 5.0 their use might re= sult in unspecified behavior, i.e. an implementation could reject it. Since 5.1, they can be used where deemed to be okay. (Disclaimer: What might be okay for most implementation can be unimplementa= ble in another; additionally, some corner cases might have been overlooked whic= h do cause problems.) * * * My quotes in comment 6 were from OpenMP 5.2, the latest release. TR11 (pre-= 6.0) is the latest spec, semi-solid but breaking changes are permitted until the final 6.0 (to fix oversights).=