From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 97F173829BFC; Tue, 2 May 2023 20:14:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97F173829BFC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683058449; bh=1IU/fwwzj8N5lafh0QUGPFNNr0zWEql6mhquxRw4BGw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=onEnB90SvoTI3ncAG17uBZIpNwmKre0g/oZnnjKgQj18ZNSxy45iXiwv3I5gLOU/V kVTCVSPn8a9ZNOzd12NFE/yn3kDHw+uzW7UrZJe3pLiIaU0yn/jisse1G6PeitDtLm U/C0Rb1wlCQJvRlvouT4vQIu+69YoJ4UofGqvuuw= 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: Tue, 02 May 2023 20:14:09 +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 #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:c5956b8cea7bf9b383a31af83e71f7cfc1a56bf1 commit r11-10705-gc5956b8cea7bf9b383a31af83e71f7cfc1a56bf1 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)=