From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 90F933861863; Thu, 1 Feb 2024 15:35:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 90F933861863 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706801710; bh=rr8FXMXGRiC4rUQNpEJe1yRpgFpSZgug9VcLBPNuLHA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wCkVvb5xKOocFDjnIMoHsc2LcQWBbYbrQPdZB5j8ETfMEkG9J6PcAf1x2O90sttzu FP+fI1qTtVgeiGFKgF5OT6lIuKCSnABCB6hEyAySPVUH1ZCLUk/pXB+3SCdFqtcoe0 1IRbcYYPJWKjwg0pGMFQq7HvTykIHdW8UhqbjTm8= From: "acoplan at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/113705] [14 Regression] ICE in decompose, at wide-int.h:1049 on aarch64-linux-gnu Date: Thu, 01 Feb 2024 15:35:10 +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 X-Bugzilla-Severity: normal X-Bugzilla-Who: acoplan 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: bug_status cc cf_reconfirmed_on everconfirmed 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=3D113705 Alex Coplan changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |acoplan at gcc dot gnu.org Last reconfirmed| |2024-02-01 Ever confirmed|0 |1 --- Comment #2 from Alex Coplan --- Confirmed. Here is a reduced testcase that ICEs with -O2 on aarch64-linux-g= nu: void free();=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 template struct generic_wide_int : storage {=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 long elt() const;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 };=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 int elt_i;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 template long generic_wide_int::elt() const {= =20=20=20=20=20=20=20 return this->get_val()[elt_i];=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 }=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 struct wide_int_storage { struct { long val[0]; long valp; } u; unsigned len; int precision; wide_int_storage(const wide_int_storage &); ~wide_int_storage(); const long *get_val() const; unsigned get_len() const; }; wide_int_storage::wide_int_storage(const wide_int_storage &) { if (__builtin_expect(precision, 0)) u.valp =3D 0; } wide_int_storage::~wide_int_storage() { if (__builtin_expect(precision, 0)) free(); } const long *wide_int_storage::get_val() const { return u.val; } unsigned wide_int_storage::get_len() const { return len; } struct irange { generic_wide_int upper_bound() const; generic_wide_int *m_base; }; generic_wide_int irange::upper_bound() const { return m_base[1]; } void set_irange() { irange r; for (unsigned i;;) { generic_wide_int __trans_tmp_1 =3D r.upper_bound(); long *__trans_tmp_2; unsigned short *len; *len =3D __trans_tmp_1.get_len(); for (i =3D 0; i < *len; ++i) *__trans_tmp_2++ =3D __trans_tmp_1.elt(); } }=