From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CA5C33858D28; Tue, 17 Jan 2023 12:57:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA5C33858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673960228; bh=9CzrokydNJygrGmjMrQAJBOJI1/ltM+Esz/iR04KSAA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=a0hG0yyDSQMvip56jNUF8L6+QCOU+PNXKS1KOAy7lJWv2H15aQ8jgfbZAcjCVqhmT UGVpW2j1lBCa4mdefxI91hGg8+YUq+tGzIeEi0zwYf9eOFi1oO7/SXasORORDsln9j 87huW0nhjDS++fG11j+YGB20qp4B2LVf1+hdA4lg= From: "m.cencora at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108417] [ICE] Crash on aggregate initialization of base class Date: Tue, 17 Jan 2023 12:57:07 +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: 10.4.1 X-Bugzilla-Keywords: ABI, ice-checking, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: m.cencora at gmail dot com 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: --- 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=3D108417 --- Comment #7 from m.cencora at gmail dot com --- Hmm, ok. So if I wanted to workaround this in generic code, what kind of types shoul= d I exclude from aggregate initialization? Any type that has a base class with a tail padding? Or just the last direct base cannot have tail padding? Also ICE-ing is not very user friendly, maybe we could use move/copy-ctor anyway for such a non-trivial base (similarly to what clang does) or at lea= st error-out with a nice message.=