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

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

https://gcc.gnu.org/g:12d7fb7e5810cc5e394d3cbea43d1b19ea7f9348

commit r12-9442-g12d7fb7e5810cc5e394d3cbea43d1b19ea7f9348
Author: Jason Merrill <ja...@redhat.com>
Date:   Thu Mar 23 16:50:09 2023 -0400

    c++: constexpr PMF conversion [PR105996]

    Here, we were calling build_reinterpret_cast regardless of whether there
was
    actually a cast, and that now sets REINTERPRET_CAST_P.  But that
    optimization seems dodgy anyway, as it involves NOP_EXPR from one
    RECORD_TYPE to another and we try to reserve NOP_EXPR for fundamental
types.
    And the generated code seems the same, so let's drop it.  And also strip
    location wrappers.

            PR c++/105996

    gcc/cp/ChangeLog:

            * typeck.cc (build_ptrmemfunc): Drop 0-offset optimization
            and location wrappers.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/constexpr-pmf3.C: New test.

Reply via email to