From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 004573858C2C; Tue, 4 Jan 2022 07:37:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 004573858C2C From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/103643] [12 Regression][OpenMP] ICE in create_tmp_var, at gimple-expr.c:482 - via gimplify_omp_affinity Date: Tue, 04 Jan 2022 07:37:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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: Tue, 04 Jan 2022 07:37:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103643 --- Comment #2 from CVS Commits --- The master branch has been updated by Chung-Lin Tang : https://gcc.gnu.org/g:62c8b21d48ab6012ddc50529a39071d902dba31a commit r12-6200-g62c8b21d48ab6012ddc50529a39071d902dba31a Author: Chung-Lin Tang Date: Tue Jan 4 15:37:15 2022 +0800 openmp: Fix ICE in gimplify_omp_affinity [PR103643] After the PR90030 patch, which removes the universal casting of all For= tran array pointers to 'c_char*', a Fortran descriptor based array passed in= to an affinity() clause now looks like: - #pragma omp task private(i) shared(b) affinity(*(c_char *) a.data) + #pragma omp task private(i) shared(b) affinity(*(integer(kind=3D4= )[0:] * restrict) a.data) The 'integer(kind=3D4)[0:]' incomplete type appears to be causing ICE d= uring gimplify_expr() due to 'is_gimple_val, fb_rvalue'. The ICE appears to be fixed just by adjusting to 'is_gimple_lvalue, fb_lvalue'. Considering the use= of the affinity() clause, which should be specifying the location of a particu= lar object in memory, this probably makes sense. gcc/ChangeLog: PR middle-end/103643 * gimplify.c (gimplify_omp_affinity): Adjust gimplify_expr of entire OMP_CLAUSE_DECL to use 'is_gimple_lvalue, fb_lvalue' gcc/testsuite/ChangeLog: * gfortran.dg/gomp/pr103643.f90: New test.=