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

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

https://gcc.gnu.org/g:0c6b4e661d875410535e17a9d82e6a0d09f28c65

commit r9-9547-g0c6b4e661d875410535e17a9d82e6a0d09f28c65
Author: Jason Merrill <ja...@redhat.com>
Date:   Thu Apr 15 15:13:18 2021 -0400

    c++: constexpr and volatile member function [PR80456]

    When calling a static member function we still need to evaluate an explicit
    object argument.  But we don't want to force a load of the entire object
    if the argument is volatile, so we take its address.  If as a result it no
    longer has any side-effects, we don't need to evaluate it after all.

    gcc/cp/ChangeLog:

            PR c++/80456
            * call.c (build_new_method_call_1): Check again for side-effects
            with a volatile object.

    gcc/testsuite/ChangeLog:

            PR c++/80456
            * g++.dg/cpp0x/constexpr-volatile3.C: New test.

Reply via email to