From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 503B73894422; Fri, 5 Mar 2021 16:41:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 503B73894422 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/99322] [11 Regression] ICE in change_scope, at final.c:1480 Date: Fri, 05 Mar 2021 16:41: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: 11.0 X-Bugzilla-Keywords: ice-on-valid-code, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 11.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: Fri, 05 Mar 2021 16:41:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99322 --- Comment #3 from Jakub Jelinek --- void bar (void *); void foo (void) { bar (&&lab); #pragma omp parallel for (;;) ; lab:; } ICEs likely since r0-88143-gb357f682db35f4431e3011e7486a0ac865686e3e Not really sure what to do if we find unreachable blocks with labels that n= eed to be preserved, we need to figure out where to place them exactly. As the problematic pass is only the cfg pass (if flag_openmp || flag_openac= c || flag_openmp_simd), I wonder if we e.g. shouldn't keep bb_to_omp_idx valid across the cleanup_tree_cfg and if non-NULL, use that for the forced label = from unreachable blocks placement.=