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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <[email protected]>:

https://gcc.gnu.org/g:9759f4fa7d01775298d8db581a36eef0baafb752

commit r17-5084-g9759f4fa7d01775298d8db581a36eef0baafb752
Author: Tobias Burnus <[email protected]>
Date:   Mon Oct 12 12:28:08 2026 +0200

    OpenMP/C++: Fix 'construct={simd}' trait-selector handling with 'declare
variant' [PR127734]

    For unknown reasons, the C++ code for handling declare variant,
    c_omp_declare_simd_clauses_to_numbers, updated the 'simd' clause, but then
    returned without actually adding the trait-selectors to the declaration
    such that this variant was never added, if 'simd' appeared as construct.

    The original simd handling code, including early return, was added in
    commit r10-4230-g42ceec0607f323.

    With this commit, the xfails of commit r17-4947-gfbcafeec06a661 could
    be removed.

    Note: For some reasons, the order of variants is reverse in C++
    compared with C, which should not have an effect, however.

    Cross ref: See also the new PR127850,
      [OpenMP] Handle user/manual-vectorization with SIMD trait in 'declare
variant'
    which relates to (preexisting) FIXME near the modified code in cp/decl.cc.

            PR c++/127734

    gcc/cp/ChangeLog:

            * decl.cc (omp_declare_variant_finalize_one): Remove early
            return when a 'simd' trait exists.

    gcc/testsuite/ChangeLog:

            * c-c++-common/gomp/simdlen-scaled-4.c: Remove xfail for C++,
            add C++ variant for __attribute__ tree scan.
            * g++.dg/gomp/simdlen-scaled-3.C: New test.

Reply via email to