From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DDE563857736; Mon, 15 May 2023 12:38:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDE563857736 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684154291; bh=VM8s6SmYP8Qo+5hm02kiHerXwfV0cSAAS8yv5IFTh40=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OUaIQGPx1QbXryXzaRWJ5V5PMg0MCLHgRO/D/r38mJyTVYcoCwKZEfioo/ZnDd+BH c9RtOZW8TJZNLqmgy12L05fUwc6reURrgBDvJjArCzQsaSrH1MWsc/gGwEFOX2h5w9 jeXZwa4SPrBpZSNY8j7CIqHCn+E/vxtNpw9ZE6Vg= From: "yann at droneaud dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109828] [13/14 Regression] static compound literal with flexible array in initializer leads to invalid size and ICE Date: Mon, 15 May 2023 12:38:10 +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, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: yann at droneaud dot fr 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=3D109828 --- Comment #7 from Yann Droneaud --- I've also experimented compound literal initialization at block level inste= ad of file level. Except in case it's not supported, it shows the same issue at block level as file level. https://godbolt.org/z/vn5Pn7hTx Unrelated, I've noted it's not possible to initialize the flexible array if= the initializer is not having a static storage. I would have expected this restriction to be lifted by now.=