From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E4B973870C2E; Fri, 30 Jun 2023 18:24:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4B973870C2E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688149493; bh=d9u8qXeeDMhLsQEniV9WJ6eTB/DK1MYbgQIFCHGFArQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LlIA45HbxQ9xoITvP8XjJ5Xvccp+ThZIRGmeJGYCrLh26VJCoxPLLSwlJ/jgz8cq4 88LzUK+lQrQdS7ApK14PX/8spSazaLKtc2rKUw8NcIpfq6tUJhP8xVnqPaIC6B7gu8 FwqfGRK3yy/3EWd9vzqLU70pdMFut9ff5vhlo4XI= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101832] __builtin_object_size(P->M, 1) where M ends with a flex-array behaves like sizeof() Date: Fri, 30 Jun 2023 18:24:53 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: qinzhao 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101832 --- Comment #12 from CVS Commits --- The master branch has been updated by Qing Zhao : https://gcc.gnu.org/g:e050ce7c3adf71eedd5482c29cf54b827e026642 commit r14-2225-ge050ce7c3adf71eedd5482c29cf54b827e026642 Author: Qing Zhao Date: Fri Jun 30 18:24:34 2023 +0000 Use TYPE_INCLUDES_FLEXARRAY in __builtin_object_size [PR tree-optimization/101832] __builtin_object_size should treat struct with TYPE_INCLUDES_FLEXARRAY = as flexible size. gcc/ChangeLog: PR tree-optimization/101832 * tree-object-size.cc (addr_object_size): Handle structure/union type when it has flexible size. gcc/testsuite/ChangeLog: PR tree-optimization/101832 * gcc.dg/builtin-object-size-pr101832.c: New test.=