From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 36F0A3858C31; Fri, 10 Feb 2023 10:11:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 36F0A3858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676023882; bh=hhs/BVHZo5kPZpG8UlD0VOcGukE1OYzOOlkIoDjvjyw=; h=From:To:Subject:Date:From; b=NP1ej/caPxXw/wRfViwM7hCSZPYWz94mKEyZZH+hhEO/0mOvfA04E4LWw39HQcohe JACgqK9HrkTWl2ejbjeZ4I0+FRrpNDGsq5uDwSdPre/w3loQzkcj5/QfmV9wkba1ZI MjM1TygU7q0JLoXsP33QjqFb2PE0MHpbD5Radt2A= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/108749] New: [OpenMP][C/C++/Fortran] inscan reduction modifier rejected for combined/composite constructs of simd/for/do Date: Fri, 10 Feb 2023 10:11:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: openmp, rejects-valid 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: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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=3D108749 Bug ID: 108749 Summary: [OpenMP][C/C++/Fortran] inscan reduction modifier rejected for combined/composite constructs of simd/for/do Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: openmp, rejects-valid Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org CC: jakub at gcc dot gnu.org Target Milestone: --- This applies to C, C++ and Fortran likewise. test.c:6:37: error: =E2=80=98inscan=E2=80=99 =E2=80=98reduction=E2=80=99 cl= ause on construct other than =E2=80=98for=E2=80=99, =E2=80=98simd=E2=80=99, =E2=80=98for simd=E2=80=99, =E2=80=98parallel for= =E2=80=99, =E2=80=98parallel for simd=E2=80=99 6 | #pragma omp target simd reduction (inscan, *:r) | ^ OpenMP 5.0 had the following: "A reduction clause with the *inscan* reduction-modifier may only appear on= a worksharing-loop construct, a worksharing-loop SIMD construct, a simd construct, a parallel worksharing-loop construct or a parallel worksharing-= loop SIMD construct." But, a bit confusingly, it also had: "If a construct to which the *inscan* reduction-modifier is applied is combined with the *target* construct, the effect is as if the sa= me list item also appears in a map clause with a map-type of tofrom." The latter implying that a combined construct is also permitted - while the former rules it out. * * * OpenMP 5.1 seemingly fixed this while 5.2 removed constructs with 'distribu= te'. In any case, OpenMP 5.2 reads as follows: "A reduction clause with the *inscan* reduction-modifier may only appear on= a worksharing-loop construct, a simd construct or a combined or composite construct for which any of the aforementioned constructs is a constituent construct and distribute is not a constituent construct." =E2=80=94 ["5.5.8= reduction Clause" under "Restrictions to the reduction clause are as follows:" (7th bullet), [136:1-4]] * * * I think this currently implies that the following ones should be supported besides the exsisting '(parallel) {do|for} (simd)' and 'simd'. OMP_MASKED_TASKLOOP_SIMD OMP_MASTER_TASKLOOP_SIMD OMP_PARALLEL_MASKED_TASKLOOP_SIMD OMP_PARALLEL_MASTER_TASKLOOP_SIMD OMP_TARGET_PARALLEL_DO OMP_TARGET_PARALLEL_DO_SIMD OMP_TARGET_SIMD OMP_TASKLOOP_SIMD=