From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 538333858427; Thu, 10 Feb 2022 18:45:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 538333858427 From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102586] [12 Regression] ICE in clear_padding_type, at gimple-fold.c:4798 since r12-3433-ga25e0b5e6ac8a77a Date: Thu, 10 Feb 2022 18:45:07 +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: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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: Thu, 10 Feb 2022 18:45:07 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102586 --- Comment #14 from Jason Merrill --- (In reply to Jakub Jelinek from comment #13) > So, perhaps if RECORD_TYPE type has TYPE_BINFO in clear_padding_type, we > should be ignoring all the DECL_ARTIFICIAL unnamed fields in the structure > and instead walk the BINFO_BASE_BINFOS ? That would make sense. > Though, in the C8 case, the C7 type of the first FIELD_DECL is the same as > TREE_TYPE of BINFO_BASE_BINFOS[0], so I'm lost where to find the right ty= pes. I'd think that should be fine; iIf you ignore the base fields, the other fi= elds are the same between the complete class type and the as-base type.=