From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 040C73858C83; Wed, 11 Jan 2023 18:44:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 040C73858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673462645; bh=qxmRI3yru5hcbs4eeCKmF2xcmcy3fvbFnjoAL+RDEYk=; h=From:To:Subject:Date:From; b=NMBpnydxIf8R+SHKDc7JkVOKUQSbXCuw39yq9n+SPv6C5d/GdP2Wj13Bk5zbit+xw GGaQnD4hc6yTNC1ztTVFchbuYO2ljwOjLKZg4m0cVE0zbkbSIapVqKL0AKms/S5ndu pNaODwu+mO5P5j86TdkxDJklbRGj5U0g1igwTijU= From: "jsm28 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108375] New: [10/11/12/13 Regression] Some variably modified types not detected as such Date: Wed, 11 Jan 2023 18:44:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jsm28 at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 108375 Summary: [10/11/12/13 Regression] Some variably modified types not detected as such Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jsm28 at gcc dot gnu.org Target Milestone: --- variably_modified_type_p fails to detect an array type as variably modified= if the array and its element type are of constant size but the element type is variably modified. For example, the following code should be diagnosed as invalid, but is not (similar rejects-valid or wrong-code examples could no doubt be constructed as well). void f (int a) { typedef int A[a]; goto x; A *p[2]; x : ; } This is a regression in 4.2 and later relative to older versions, I think introduced by g:2e3b8fe7b5405a94d86bfa323c0e80e83c58d784 . commit 2e3b8fe7b5405a94d86bfa323c0e80e83c58d784 Author: Eric Botcazou Date: Wed May 17 13:11:09 2006 +0000 tree.c (variably_modified_type_p): Return true if the element type is variably modified without recursing. * tree.c (variably_modified_type_p) : Return true if the element type is variably modified without recursing. From-SVN: r113858=