From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ADA383858D33; Wed, 25 Jan 2023 00:47:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ADA383858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674607660; bh=Wz04cAHQ/a4+aghfWgjL9wODs3YJi+XFYWWV4G+Yt1U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Jkp2xMn1O/zLVZ+BOaqJt0VULbCe5uEUDo0yeK8LDiEi4FTzG3cFnNHJq+8rHbdnj m7cNZhl4yOgyr0r7/cZVaWqB0smlyMxuw3+vDctl9mzCk5sEXT5lGhUVB62kyLbviJ S7l80Vh4Qn/dM1SQWml6j7N6SqptXWlEOeVJdXTE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108522] [12/13 Regression] ICE in tree-object-size when struct has VLA Date: Wed, 25 Jan 2023 00:47:40 +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: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: siddhesh at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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=3D108522 --- Comment #3 from CVS Commits --- The master branch has been updated by Siddhesh Poyarekar : https://gcc.gnu.org/g:b851ee9fdf0f3023635f0cb1f7c607b2d6801053 commit r13-5341-gb851ee9fdf0f3023635f0cb1f7c607b2d6801053 Author: Siddhesh Poyarekar Date: Tue Jan 24 19:47:05 2023 -0500 tree-optimization/108522 Use COMPONENT_REF offset when available Use the offset in TREE_OPERAND(component_ref, 2) when available instead of DECL_FIELD_OFFSET when trying to compute offset for a COMPONENT_REF. Co-authored-by: Jakub Jelinek gcc/ChangeLog: PR tree-optimization/108522 * tree-object-size.cc (compute_object_offset): Use TREE_OPERAND(ref, 2) for COMPONENT_REF when available. gcc/testsuite/ChangeLog: PR tree-optimization/108522 * gcc.dg/builtin-dynamic-object-size-0.c (test_dynarray_struct_member): New test. (main): Call it. Signed-off-by: Siddhesh Poyarekar =