From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D3850383642D; Wed, 18 May 2022 14:33:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3850383642D From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105634] [9/10/11/12/13 Regression] ICE: Floating point exception in maybe_warn_class_memaccess Date: Wed, 18 May 2022 14:33:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: error-recovery, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P5 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2022 14:33:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105634 --- Comment #3 from CVS Commits --- The trunk branch has been updated by Marek Polacek : https://gcc.gnu.org/g:dfe38b8d5dbfe3dd5209aece4ce2f7a6b303a2f9 commit r13-621-gdfe38b8d5dbfe3dd5209aece4ce2f7a6b303a2f9 Author: Marek Polacek 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.=