From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 68E693896C02; Mon, 13 Feb 2023 13:57:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68E693896C02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676296675; bh=aEtI7eqiT7a3++Zr2gT3CbmPxwAuO0BTjOyixIHo2yI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AaovO2wqIMklj4UrQHfarD5wnyRmXqbBJktKfEbvEBp8PO08Sd92Mz5nxE7xjudkC u+f0tSJsdrkcilttrkPbbd0pSAIA1FvBcz5/Z6OMEtG3RI4m5qKBL1j+wVPz8YN05r bhfNXdnEBXl+EKZXtkk3aHnOm6+hTeJJJHWHkwzs= From: "muecker at gwdg dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108375] [10/11/12/13 Regression] Some variably modified types not detected as such Date: Mon, 13 Feb 2023 13:57:54 +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.0 X-Bugzilla-Keywords: accepts-invalid 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: 10.5 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=3D108375 --- Comment #5 from Martin Uecker --- Recursing into arrays is simple and does not seem to cause any problems, but this not enough for GNU C, we can also have VLA or variably modified types as member of structs. At least the later is sometimes useful. void bar(int a) { struct foo { char (*p)[a]; }; goto x; struct foo B; x: ; } Unfortunately, recursing into structs is too expensive. We could use walk_tree_without_duplicates but this still seems expensive. I think we should simply add a bit which is set by the C FE for such structs. The question is whether this is also needed by Ada or other languages?=