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

--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Patrick Palka
<ppa...@gcc.gnu.org>:

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

commit r12-10017-gc9cb7e3d75d494a6591887a99d0d3f7f7a307b2e
Author: Patrick Palka <ppa...@redhat.com>
Date:   Thu Nov 16 09:32:07 2023 -0500

    c++: constantness of call to function pointer [PR111703]

    potential_constant_expression for CALL_EXPR tests FUNCTION_POINTER_TYPE_P
    on the callee rather than on the type of the callee, which means we
    always pass want_rval=any when recursing and so may fail to identify a
    non-constant function pointer callee as such.  Fixing this turns out to
    further work around PR111703.

            PR c++/111703
            PR c++/107939

    gcc/cp/ChangeLog:

            * constexpr.cc (potential_constant_expression_1) <case CALL_EXPR>:
            Fix FUNCTION_POINTER_TYPE_P test.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/concepts-fn8.C: Extend test.
            * g++.dg/diagnostic/constexpr4.C: New test.

    (cherry picked from commit 0077c0fb19981c108a01cd15af9b2d6d478c183b)

Reply via email to