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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>:

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

commit r13-621-gdfe38b8d5dbfe3dd5209aece4ce2f7a6b303a2f9
Author: Marek Polacek <pola...@redhat.com>
Date:   Tue May 17 15:13:58 2022 -0400

    c++: fix SIGFPE with -Wclass-memaccess [PR105634]

    Here we crash because we attempt to % by 0.  Thus fixed.
    While at it, I've moved the -Wclass-memaccess tests into warn/.
    I've checked that the # of expected passes is the same before/after
    the move.

            PR c++/105634

    gcc/cp/ChangeLog:

            * call.cc (maybe_warn_class_memaccess): Avoid % by zero.

    gcc/testsuite/ChangeLog:

            * g++.dg/Wclass-memaccess-2.C: Moved to...
            * g++.dg/warn/Wclass-memaccess-2.C: ...here.
            * g++.dg/Wclass-memaccess-3.C: Moved to...
            * g++.dg/warn/Wclass-memaccess-3.C: ...here.
            * g++.dg/Wclass-memaccess-4.C: Moved to...
            * g++.dg/warn/Wclass-memaccess-4.C: ...here.
            * g++.dg/Wclass-memaccess-5.C: Moved to...
            * g++.dg/warn/Wclass-memaccess-5.C: ...here.
            * g++.dg/Wclass-memaccess-6.C: Moved to...
            * g++.dg/warn/Wclass-memaccess-6.C: ...here.
            * g++.dg/Wclass-memaccess.C: Moved to...
            * g++.dg/warn/Wclass-memaccess.C: ...here.
            * g++.dg/warn/Wclass-memaccess-7.C: New test.

Reply via email to