From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF1913857348; Mon, 15 May 2023 22:41:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF1913857348 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684190491; bh=3AbE6zvsQbUvUUa5j2sv8b6AlZGU7QFDI6i94LcF60E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hN+CyVifRuP5Umn892sltDoMLJsY/3LfatnxhTFmQIi2IUp3DsnFadq0HojRjNSpV d58UTlxnhEL64jJTpXnv0hqVjS6eetGyCOcSuc98vdjkjQTrBm0hUW5gN7iHFpuf/V fRV5S3M6eqnjhKBB5n6mIZggh0s0s7gWYcnOOX9o= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109806] [13/14 Regression] 13.1.0 cc1plus stack smashing crash with C array of complex structs Date: Mon, 15 May 2023 22:41:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: ice-on-valid-code, memory-hog X-Bugzilla-Severity: critical X-Bugzilla-Who: jakub 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: 13.2 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109806 --- Comment #15 from Jakub Jelinek --- That ICE is because layout_class_type calls c_build_bitfield_integer_type w= ith width of 0 and that type is then seen by ranger for some reason: #7 0x0000000000c4eee1 in layout_class_type (t=3D, virtuals_p=3D0x7fffffffd4c8) at ../../gcc/cp/class.cc:6858 6853 tree ftype =3D TREE_TYPE (field); 6854 width =3D tree_to_uhwi (DECL_SIZE (field)); 6855 if (width !=3D TYPE_PRECISION (ftype)) 6856 { 6857 TREE_TYPE (field) 6858 =3D c_build_bitfield_integer_type (width, 6859 TYPE_UNSIGNED (ftype)); 6860 TREE_TYPE (field) 6861 =3D cp_build_qualified_type (TREE_TYPE (field), 6862 cp_type_quals (ftype)); I think unnamed bitfields are just padding and shouldn't have this called.=