From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AF66138618AB; Tue, 28 Nov 2023 09:02:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF66138618AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701162153; bh=YkI9Dk15TL49Gizubfh5cXKdu6Pvx5OD6mjrXxRZK+I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GFV5tCD2yVu5meskS6CL24+JG5dzE9Kb8i2/8sOfADzV+Olp0m3GjqZ86n+Mde4bi vn7erxK1H/hanpXWU2m4x/aCMWs3llwURFZi2zW437NfE/0HhYB4rGBNpIfpyJVrtP D7MSHauFAcxpOM6fGl8VLA0j8IWDuwhEmnKq4lJE= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/112733] [14 Regression] ICE: Segmentation fault in wide-int.cc during GIMPLE pass: sccp Date: Tue, 28 Nov 2023 09:02:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112733 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |rguenth at gcc dot gnu.org --- Comment #4 from Richard Biener --- Hmm, stack corruption. Last good frame: #0 wi::divmod_internal (quotient=3D0x0, remainder_len=3D0x7fffffffc8fc,=20 remainder=3D0x7fffffffc990, dividend_val=3D0x7ffff71c4e68, dividend_len= =3D1,=20 dividend_prec=3D131072, divisor_val=3D0x7ffff702d010, divisor_len=3D1,= =20 divisor_prec=3D131072, sgn=3DUNSIGNED, oflow=3D0x0) at /space/rguenther/src/gcc/gcc/wide-int.cc:1800 #1 0x00000000011ec195 in wi::mod_trunc >, generic_wide_int > > (x=3D..., y=3D...,=20 sgn=3DUNSIGNED, overflow=3D0x0) at /space/rguenther/src/gcc/gcc/wide-in= t.h:3382 #2 0x00000000011e90ee in wi::multiple_of_p >, generic_wide_int > > (x=3D..., y=3D...,=20 sgn=3DUNSIGNED) at /space/rguenther/src/gcc/gcc/wide-int.h:3549 #3 0x00000000011d564d in multiple_of_p ( type=3D,=20 top=3D, bottom=3D,=20 nowrap=3Dtrue) at /space/rguenther/src/gcc/gcc/fold-const.cc:14554 #4 0x00000000011caa58 in fold_binary_loc (loc=3D0, code=3DBIT_AND_EXPR,=20 type=3D,=20 op0=3D, op1=3D) at /space/rguenther/src/gcc/gcc/fold-const.cc:12112 #5 0x00000000011d4356 in fold_build2_loc (loc=3D0, code=3DBIT_AND_EXPR,=20 type=3D,=20 op0=3D, op1=3D) at /space/rguenther/src/gcc/gcc/fold-const.cc:14128 #6 0x0000000001848eba in analyze_and_compute_bitop_with_inv_effect ( loop=3D0x7ffff700e4b0, phidef=3D,=20 niter=3D) at /space/rguenther/src/gcc/gcc/tree-scalar-evolution.cc:3719 and we end up with (gdb) p divisor_blocks_needed $36 =3D 4096 if (remainder) { *remainder_len =3D wi_pack (remainder, b_remainder, n, dividend_prec); (gdb) p n $50 =3D 4096 (gdb) p dividend_prec $51 =3D 128 (gdb) p remainder $52 =3D (long *) 0x7fffffffc990 (gdb) p b_remainder $53 =3D (unsigned int *) 0x7ffffffec0f0 and that wi_pack faults.=