From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4382D392AC1B; Fri, 10 Feb 2023 17:46:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4382D392AC1B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676051184; bh=UfhFeoqj454PAHkiou+nF4uoencONu8oX5CAJcflh2k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YXklc9YdDX8prcc5JjOy4HqiRmdZC1Mglfpz6FhfJqyCA7yM88HRH8cB/u17FBF2o RRlaJt1iuFQFeMO11lgzKwR/LnpQGjevQF8Ba6tevUAWmx0/Q8jsZvr4WT3clHdFvH EreI9G2tpaKPgHG+eNJHcEeGumIxibwCYlvo7+Fo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108607] [12 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003 Date: Fri, 10 Feb 2023 17:46:21 +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: error-recovery, 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: 12.3 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=3D108607 --- Comment #4 from CVS Commits --- The releases/gcc-12 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:a62d952064c896eaf94e70d7999e6e27343babcf commit r12-9148-ga62d952064c896eaf94e70d7999e6e27343babcf Author: Jakub Jelinek Date: Wed Feb 1 10:38:46 2023 +0100 c++, openmp: Handle some OMP_*/OACC_* constructs during constant expres= sion evaluation [PR108607] While potential_constant_expression_1 handled most of OMP_* codes (by saying that they aren't potential constant expressions), OMP_SCOPE was missing in t= hat list. I've also added OMP_SCAN, though that is less important (similarly to OMP_SECTION it ought to appear solely inside of OMP_{FOR,SIMD} resp. OMP_SECTIONS). As the testcase shows, it isn't enough, potential_constant_expression_1 can catch only some cases, as soon as one uses switch or ifs where at l= east one of the possible paths could be constant expression, we can run into= the same codes during cxx_eval_constant_expression, so this patch handles t= hose there as well. 2023-02-01 Jakub Jelinek PR c++/108607 * constexpr.cc (cxx_eval_constant_expression): Handle OMP_* and OACC_* constructs as non-constant. (potential_constant_expression_1): Handle OMP_SCAN and OMP_SCOP= E. * g++.dg/gomp/pr108607.C: New test. (cherry picked from commit bfc070595bfb00abef88a002eee5d9117f5b86a7)=