https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108607

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:c5956b8cea7bf9b383a31af83e71f7cfc1a56bf1

commit r11-10705-gc5956b8cea7bf9b383a31af83e71f7cfc1a56bf1
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Feb 1 10:38:46 2023 +0100

    c++, openmp: Handle some OMP_*/OACC_* constructs during constant expression
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 that
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 least
    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 those
    there as well.

    2023-02-01  Jakub Jelinek  <ja...@redhat.com>

            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)
  • [Bug c++/108607] [12 Regression... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to