From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 06AD63858427; Wed, 23 Mar 2022 05:56:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06AD63858427 From: "siddhesh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/104970] [12 Regression] ICE in execute_todo, at passes.cc:2133 since r12-6480-gea19c8f33a3a8d2b Date: Wed, 23 Mar 2022 05:56:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: siddhesh at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: siddhesh at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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: Wed, 23 Mar 2022 05:56:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104970 --- Comment #8 from Siddhesh Poyarekar --- (In reply to Martin Sebor from comment #7) > The dollar sign in the internal attr_access string implies a VLA bound and > the attr_access::vla_bounds() function queries the VLA bounds. That shou= ld > make it possible to distinguish the two cases. I noticed a attr_access.internal_p which has the following comment in attribs.c: /* Forms containing the square bracket are internal-only (not specified by an attribute declaration), and used for various forms of array and VLA parameters. */=20=20=20 That should be a good differentiator right? It fixes the motivating case h= ere. This is what I'm testing a bit more extensively. diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc index b0b50774936..1e87739eda6 100644 --- a/gcc/tree-object-size.cc +++ b/gcc/tree-object-size.cc @@ -1477,7 +1477,7 @@ parm_object_size (struct object_size_info *osi, tree = var) tree typesize =3D TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (parm))); tree sz =3D NULL_TREE; - if (access && access->sizarg !=3D UINT_MAX) + if (access && access->sizarg !=3D UINT_MAX && !access->internal_p) { tree fnargs =3D DECL_ARGUMENTS (fndecl); tree arg =3D NULL_TREE;=