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

--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:4620c4b7b76baf4e66cd1ab22b1cc6a9e810c0c7

commit r11-11502-g4620c4b7b76baf4e66cd1ab22b1cc6a9e810c0c7
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Apr 5 09:31:28 2024 +0200

    c++: Fix ICE with weird copy assignment operator [PR114572]

    While ctors/dtors don't return anything (undeclared void or this pointer
    on arm) and copy assignment operators normally return a reference to *this,
    it isn't invalid to return uselessly some class object which might need
    destructing, but the OpenMP clause handling code wasn't expecting that.

    The following patch fixes that.

    2024-04-05  Jakub Jelinek  <ja...@redhat.com>

            PR c++/114572
            * cp-gimplify.c (cxx_omp_clause_apply_fn): Call build_cplus_new
            on build_call_a result if it has class type.

            * testsuite/libgomp.c++/pr114572.C: New test.

    (cherry picked from commit 592536eb3c0a97a55b1019ff0216ef77e6ca847e)

Reply via email to