From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE3F43857429; Thu, 5 Aug 2021 18:25:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE3F43857429 From: "muecker at gwdg dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/29970] mixing ({...}) with VLA leads to massive breakage Date: Thu, 05 Aug 2021 18:25:50 +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: 4.3.0 X-Bugzilla-Keywords: ice-on-valid-code, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: muecker at gwdg dot de 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 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, 05 Aug 2021 18:25:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D29970 --- Comment #9 from Martin Uecker --- The sizeof problem is that in c_expr_sizeof_expr the argument of sizeof is = only evaluated for VLAs but not for structs of variable size. The information ab= out the size is then lost. Changing this fixes some more cases. A third problem seems to be that in gimplify_target_expr the size expressio= ns are also gimplified to early. Fixing this also seems to fix some of the cas= es, but then triggers some other down stream problems...=