From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F38653857C71; Wed, 1 Feb 2023 09:44:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F38653857C71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675244641; bh=xiFvqEZL5KNupUPWw/KwMioO+nxugoi802UErh0O7dE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pPPILxuTDThXeG4TV7b4Xha+CVXMWQ6JvcrDHVjCC7KrBUHX+Oohb4urFROJuirdz yCKKuv/5XWXlWLPO0KVfTnOsOJfLKztt+WZwY70kLY7L8G5ha41CKmn51BYc+OEmow G7k0bZIhcMvKCACBuaet84Upn9crYEslmdh9xpf8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108607] [12/13 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003 Date: Wed, 01 Feb 2023 09:43:58 +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 #2 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:bfc070595bfb00abef88a002eee5d9117f5b86a7 commit r13-5621-gbfc070595bfb00abef88a002eee5d9117f5b86a7 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.=