From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 590393888C61; Wed, 3 May 2023 15:21:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 590393888C61 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683127264; bh=2Jreaw3+kH9eF9KDfxEmlQhAX7U2ecLlOinGlkZ1y/o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XGlt8+qPTxrYS5pymCfeGhimrNXzjNjp0Y/z86TeMtd1AtSCZ7gZmO6LcqBpz+b0f lot3mkt/SXa8WLQn393c96xjTCMBL757QxdGPedboV6bfC1Mu8+I5saSevQhrP1OcA nPFuO8kVmDgQzGMznsUk7FvYrhT7lDCZh1+/ffa8= 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: Wed, 03 May 2023 15:21:03 +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: RESOLVED X-Bugzilla-Resolution: FIXED 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 #7 from CVS Commits --- The releases/gcc-10 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:bd28648bf4923592462a938b31069a06ee39caea commit r10-11360-gbd28648bf4923592462a938b31069a06ee39caea 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.c (cxx_eval_constant_expression): Handle OMP_* and OACC_* constructs as non-constant. (potential_constant_expression_1): Handle OMP_SCAN. * g++.dg/gomp/pr108607.C: New test. (cherry picked from commit bfc070595bfb00abef88a002eee5d9117f5b86a7)=