From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6B0D03853550; Wed, 3 May 2023 15:19:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B0D03853550 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683127149; bh=gBmVqClZoQJjndgY/+3rb63hexOv1dZMoQL584QWtYw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZPTaWWc+Y1g0wvPji92tIFOEZPIbQohyE9tctxuUT7tesuB2MwEOjCWiGMMsWEvLw wHeWlSvqBqu0cT6O5a0IVO9ID6V1dVhGTJ8qvPwZRMCNZU/XR/+BjcigyBBETF7QKU MsrioMvoZtxVx+o9JFjb61CAYNY6G00STjZ97IX0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107001] ICE in expand_gimple_stmt_1, at cfgexpand.cc:4017 since r9-3941-g28567c40e2c7c88e Date: Wed, 03 May 2023 15:19:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.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: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub 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=3D107001 --- Comment #6 from CVS Commits --- The releases/gcc-10 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:8629045a50bbc37d25fe9203c810a96ef96ef0f7 commit r10-11338-g8629045a50bbc37d25fe9203c810a96ef96ef0f7 Author: Jakub Jelinek Date: Sat Sep 24 09:24:26 2022 +0200 openmp: Fix ICE with taskgroup at -O0 -fexceptions [PR107001] The following testcase ICEs because with -O0 -fexceptions GOMP_taskgroup_end call isn't directly followed by GOMP_RETURN statement, but there are so= me conditionals to handle exceptions and we fail to find the correct GOMP_RETURN. The fix is to treat taskgroup similarly to target data, both of these constructs emit a try { body } finally { end_call } around the construct's body du= ring gimplification and we need to see proper construct nesting during gimplification and omp lowering (including nesting of regions checks), but during omp expansion we don't really need their nesting anymore, all we need is emit somethi= ng at the start of the region and the end of the region is the end API call w= e've already emitted during gimplification. For target data, we weren't add= ing GOMP_RETURN statement during omp lowering, so after that pass it is tre= ated merely like stand-alone omp directives. This patch does the same for taskgroup too. 2022-09-24 Jakub Jelinek PR c/107001 * omp-low.c (lower_omp_taskgroup): Don't add GOMP_RETURN statem= ent at the end. * omp-expand.c (build_omp_regions_1): Clarify GF_OMP_TARGET_KIND_DATA is not stand-alone directive. For GIMPLE_OMP_TASKGROUP, also d= on't update parent. (omp_make_gimple_edges) : Reset cur_region back after new_omp_region. * c-c++-common/gomp/pr107001.c: New test. (cherry picked from commit ad2aab5c816a6fd56b46210c0a4a4c6243da1de9)=