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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>:

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

commit r13-1688-gf70c18524221dcefa6cd26cee7b55503181bd912
Author: Patrick Palka <ppa...@redhat.com>
Date:   Wed Jul 13 14:02:08 2022 -0400

    c++: non-dependent call to consteval operator [PR105912]

    Here we're crashing when substituting a non-dependent call to a
    consteval operator, whose CALL_EXPR_OPERATOR_SYNTAX flag we try to
    propagate to the result, but the result isn't a CALL_EXPR since the
    selected function is consteval.  This patch fixes this by checking the
    result of extract_call_expr accordingly.  (Note that we can't check
    DECL_IMMEDIATE_FUNCTION_P here because we don't know which function was
    selected by overload resolution from here.)

            PR c++/105912

    gcc/cp/ChangeLog:

            * pt.cc (tsubst_copy_and_build) <case CALL_EXPR>: Guard against
            NULL_TREE extract_call_expr result.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/consteval31.C: New test.

Reply via email to