From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 52B423858D20; Thu, 3 Mar 2022 16:28:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 52B423858D20 From: "tschwinge at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/104774] New: OpenACC 'kernels' decomposition: internal compiler error: 'verify_gimple' failed, with 'loop' with explicit 'seq' or 'independent' Date: Thu, 03 Mar 2022 16:28:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code, openacc X-Bugzilla-Severity: normal X-Bugzilla-Who: tschwinge at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: tschwinge 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 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 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: Thu, 03 Mar 2022 16:28:25 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104774 Bug ID: 104774 Summary: OpenACC 'kernels' decomposition: internal compiler error: 'verify_gimple' failed, with 'loop' with explicit 'seq' or 'independent' Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, openacc Severity: normal Priority: P3 Component: middle-end Assignee: tschwinge at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org Target Milestone: --- Another one in addition to PR104132, PR104133, that is *not* fixed by my WIP patches for those: int arr_0; void foo (void) { #pragma acc kernels { int k; #pragma acc loop seq for (k =3D 0; k < 2; k++) arr_0 =3D k; #pragma acc loop independent reduction(+: arr_0) for (k =3D 0; k < 2; k++) arr_0 +=3D k; } } With '-fopenacc --param openacc-kernels=3Ddecompose -O0 -g0' (so, not invol= ving 'GIMPLE_DEBUG's), for both C and C++, we run into: pr.c: In function =E2=80=98foo._omp_fn.0=E2=80=99: pr.c:18:1: error: non-register as LHS of binary operation 18 | } | ^ # .MEM_21 =3D VDEF <.MEM_3> k =3D 0 + .offset.24_2; pr.c:18:1: error: invalid RHS for gimple memory store: =E2=80=98var_dec= l=E2=80=99 *_23; k # .MEM_24 =3D VDEF <.MEM_21> *_23 =3D k; pr.c:18:1: error: non-register as LHS of binary operation # .MEM_27 =3D VDEF <.MEM_4> k =3D 0 + 2; during GIMPLE pass: ssa pr.c:18:1: internal compiler error: verify_gimple failed Only with both 'loop's changed to implicit or explicit 'auto' (that is, both 'seq' and 'independent' removed), we succeed to compile (with my PR104132, PR104133 WIP patches applied).=