From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1F1623858425; Fri, 12 May 2023 20:43:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F1623858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683924196; bh=po9/f6lhGlEBGs01zTHh9jZCH+DKKnWT7UXDpUjeUh8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dDzlvHtNXl8aMl1O0Bx/P/+WepQZ3JRERWJ+76lmqt5xNwp9XduqtWF0cJHAmkXYP 4jzoV1GcItj3+JU7WR4GdjGspFt26IOUlMmOdM1xMEIt82cOVsqW0cj1jOm5ZMYXSs gbZLD0Z2FSB6diwn+3miyfa6NUknoMED9EA735EA= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109828] [13/14 Regression] C2x:static compound literal (with flexible array) in initializer leads to invalid size and ICE Date: Fri, 12 May 2023 20:43:15 +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: 13.1.0 X-Bugzilla-Keywords: accepts-invalid, assemble-failure, ice-checking, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: --- 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=3D109828 --- Comment #6 from Andrew Pinski --- here is another example where we output a bogus `.zero` (though it does not ICE): struct s { int i; char c[]; }; const struct s *t =3D &(struct s) { .c =3D {'2','\0'}, }; We get: .size __compound_literal.0, 4 __compound_literal.0: .long 1 .byte 50 .byte 0 .zero 18446744073709551613 ;; -3 .zero 1=