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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>:

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

commit r15-6885-gf7b7fe16579ac13d7fd48e7f9a6082778a0a99f7
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Mon Jan 13 10:14:45 2025 -0800

    c++: Add support for vec_dup to constexpr [PR118445]

    With the addition of supporting operations on the SVE scalable vector
types,
    the vec_duplicate tree will show up in expressions and the constexpr
handling
    was not done for this tree code.
    This is a simple fix to treat VEC_DUPLICATE like any other unary operator
and allows
    the constexpr-add-1.C testcase to work.

    Built and tested for aarch64-linux-gnu.

            PR c++/118445

    gcc/cp/ChangeLog:

            * constexpr.cc (cxx_eval_constant_expression): Handle VEC_DUPLICATE
like
            a "normal" unary operator.
            (potential_constant_expression_1): Likewise.

    gcc/testsuite/ChangeLog:

            * g++.target/aarch64/sve/constexpr-add-1.C: New test.

    Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>

Reply via email to