[V6,0/2] Handle component_ref to a structure/union field including FAM for builtin_object_size
Message ID | 20230328154944.3946619-1-qing.zhao@oracle.com |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 98E8A385843A for <patchwork@sourceware.org>; Tue, 28 Mar 2023 16:03:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98E8A385843A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680019437; bh=kNdJlMhUqzhm9j4998kqUJ/M7UJpZgy+fr1ymb7Kz1U=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Qv1wbS3G4oQ0Bo6R5lRMK4Hh+ZCtoMlimIKh/QhPtmUoVT4MatS3ucH3aQ8fo4MMZ u8JL2N3mf6dE6RG97iGmZf7Dbbtg8tBeD3DdJQ7M7Gk80YUcNnZSldN7HUft+8CdE+ cTS4+UklyeP3LUbMyFefAMHsslBdDMZhn1Z8ioKg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 0DF7A38582BE for <gcc-patches@gcc.gnu.org>; Tue, 28 Mar 2023 16:02:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0DF7A38582BE Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32SFxXdD006553; Tue, 28 Mar 2023 16:02:42 GMT Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3pm3byg0c6-19 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Mar 2023 16:02:42 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 32SEgQVW027730; Tue, 28 Mar 2023 15:49:50 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2175.outbound.protection.outlook.com [104.47.56.175]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3phqd6k68g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Mar 2023 15:49:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fQAzruZoJwhquXv3FjR0Nxrpd7LidR9uGdclLenmsD1/sTwdi/Quw3l9akah1N2D1LErXWrH3SeMDjzF624XGl2sVX/wiSgOt8PhWKEASiQJPQc4Ctxx+QzI3cSmWuwGAFf6QdgUH5JhVw442S6FLXXAZagayB3msaPbXrYnNK0nBIufP5h2BDdWdKzw2xmiPskg2MDXBvVGCegsQaJfVTLOMzCLoKlGiw6kTnh3ijSdrzJlo7ioXFOfZmL0TQLz7uRr54sTc389hfGaioAbLfWhTcvp76/ZmqW4kg7Jy1hTdaDZNlbP2rFQmHxqmC0Gca4DVIBr0h1f+0ZuPCFrVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kNdJlMhUqzhm9j4998kqUJ/M7UJpZgy+fr1ymb7Kz1U=; b=GEyNeIdiGX79ZcXDaMV2x7wJGIdT0pfnRyGOafud+v9sm6gkmWHH3Q24BFjCRmNhKIvMkGGOLjLZ/JAY9Y/TSvi9P4yqlE02OvJcquKm7efUpUnTaedY+NhtEUykzuif2zT3ei+BIo+NQb/oCAFnjeSODLvneSLaBUPqE+whtupaoPGEhcAYStasu7//5QoxT+dFCPnMvSWJTKu1TpkqmZ/JdIlTtmKUeb8GM0nsfZ8e6sM4yIQip5m1JnOe3D1hyw53jEU2S3oA91IKyeoOIUAE3ShUWlH8KtfBtRJT9bHx3hnigoFzxkLiLt4FwzL6OZy1DA00nSUKA91qdWsvng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from CH2PR10MB4344.namprd10.prod.outlook.com (2603:10b6:610:af::19) by CY8PR10MB6563.namprd10.prod.outlook.com (2603:10b6:930:59::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Tue, 28 Mar 2023 15:49:49 +0000 Received: from CH2PR10MB4344.namprd10.prod.outlook.com ([fe80::a33f:73da:f5e2:6c0a]) by CH2PR10MB4344.namprd10.prod.outlook.com ([fe80::a33f:73da:f5e2:6c0a%5]) with mapi id 15.20.6222.033; Tue, 28 Mar 2023 15:49:49 +0000 To: jakub@redhat.com, joseph@codesourcery.com Cc: richard.guenther@gmail.com, keescook@chromium.org, siddhesh@gotplt.org, gcc-patches@gcc.gnu.org, Qing Zhao <qing.zhao@oracle.com> Subject: [V6][PATCH 0/2] Handle component_ref to a structure/union field including FAM for builtin_object_size Date: Tue, 28 Mar 2023 15:49:42 +0000 Message-Id: <20230328154944.3946619-1-qing.zhao@oracle.com> X-Mailer: git-send-email 2.31.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SA0PR11CA0052.namprd11.prod.outlook.com (2603:10b6:806:d0::27) To CH2PR10MB4344.namprd10.prod.outlook.com (2603:10b6:610:af::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR10MB4344:EE_|CY8PR10MB6563:EE_ X-MS-Office365-Filtering-Correlation-Id: bbf77f8f-8a15-4765-cf88-08db2fa40fb1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jb0GgkieKnbJRl/RlGH6lYGqFMkt3GlHb353YWJF3gOiPECS3fAkIAWDE1cj1VqOWRG7h3Oug6RlQYXQyhsTxsCQcaUSKZAqqWEg0K003qcf9TTtSAZHsciuB/bdNMWPk3lXlzR7qlYAW1EoLl8h6+5oSr/JjcWeV5GTEu5Q4h+yl8FOA+3VEs43M4AMBLnCFiLcAQs/2tU7F1rx6uMosQcFMese3+uFucVA/tC+9/tK67/7xPdhnRNF5q53beIvRQ2Jch9nPJmP1rwRtY6Ipx2OTKUTlohSIzz5HlOQrILrqiNfSupp8LZsjfUr/zF4MNe9Uz0aGZTORMny2PB2r3tc2JhQ0HQpSTL/0XtDFc7wttjS8h3yCRo2NPCJkwbGp0UazJmRR7QrEVSeav8zDh2k355vnqD45CSDOoAtr4ehRr6Dv+ullwa2Dx/F7OgJ+PL2HFwlGy8MK4YUBAiMV7HDaNnYgu4RW04ORqSp/jKRIT0k6PZejSxVb5d8/Ct05o/+qIGF0ID0Mnmry9N2Q/FEROftt2gEy+a0zB56h8dOKaQjjivzVZtGwDJqAdjv X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR10MB4344.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(376002)(39860400002)(136003)(346002)(396003)(366004)(451199021)(478600001)(26005)(6666004)(38100700002)(86362001)(6512007)(316002)(6486002)(5660300002)(6506007)(8936002)(36756003)(44832011)(186003)(2906002)(41300700001)(66476007)(83380400001)(1076003)(8676002)(107886003)(66556008)(66946007)(4326008)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KY12dY1vLXcSPc3VcEjXDTFOwG1Sc/Nzx/BcB0HyQeXs/0/nNiQ7icH8YJRlO73YaIxKHtOoMFDxOM+UL5F5BvQnwHIOmDXtAhkzd7mEHmAPP36fmgCdQgFUE+nEOtlAp4AvAjT9o4vKU+KLgxvcfjovlsUlGvnWpUPepqZC7lio8VshEi9vJ3SOV61YCiWsWbKy2ZCV9TCG0GwvdzxWQK+p1FXebaCGmEifS6oKnzvaBhV0VUzsiS8zwxHIAeYgK/1TSYVv+4Yiv3sXxck5o+XUHaefpV95kYrGxCzVdlKWNNs1iHql6CotN45z5qpWUs9Mg42iyDZVKkraaXqi9RrMlSFAOtAe9CjSHVj65/mjPZ7YzMKL/k/Gm3I8nTP+qSrXI0kK178i1hzowFEyzDFD1eG/hDL0MRIxpg3TN5w6tyAiABXjhOTX+TzQl69XceKB2pU/35gYb8dgdkmJy8b/Nl4fvIQAYk3fIsddTuQ/L6kgnSxiz+PjMCFHa+WsGuZAkKwFc4naV/oGHORN+teLFmt03NaHqHJJ2jJCk/CxJIJO7bUdYMjR3PCzANrveneoZlSEIfA84o+23VdO9Kf4Wg/Wu8H4MXQJ/GbxOg2E9JPhRvlwAZAH+Bdkqx2Qe7prre+ILZuWoyHvn49dwgLWV5YsEDnQ6tolM4BzDWG6Xgyv8goXdN3nju491e8tY/30HKVugEP/6ekF05y0b/16vCAMdKH7Q/kfa9F3SxXfF7ybpFo7W39ht15twRilzUoXtzWlQZgg06/VA1tzd9Pf+FEsRuzvHwrI4h56pJfjtp2/KnLAX/guR6zGmkkB/mS9OOEO10Xe69GXcId6A673a8pCtI4m/hoXzV1SfNOjFHHelpjsVPmQjsQ31GIpjxCSLJhSy/AD6o1eoN5q3RIH3IK1ikmhAMeo34fUns53PASEfF06VkWVGEQSZAJ3VY7oLOpWgGBTpCe3qw/Pijs1/uVd/OHYVSGaUtQDAV7H+b3wxiEvrxHF7KQ6ENCLCUr8o8fqX8MgLd3LwPDji9ImkVa0KpYOaOPBAq7MaXIGupXCiK7UIBHHuNEbDfOQVbv74NGidFJjZiweCycv4gXLaecvoFRKoHy4NeV1EjqM6kQiowSZ9VFEAkGaimVw3XFr6EOwvMT4/JJBXXuIl3V60X874MtbAtLMmFAL9mEz66AeiDfaB770Vx66QsJ4HRXRYUYKbx1BX7YERjSvontUCtyXt//RoK5BkWwTnR0jN7IEfcoCtVlgFOPJikS+Jd88CyyLxPVuuMIuW6SFTXm1zs19UQnsYlQRz8324K88LRGdn2llRoYY6EhPyChpmVQK9rTFYT7uMCFaA/TCvp6I8AkQD/gHn2/nh8T7JZkbCrlQuzhJZ/COBKJjjFTWrJQUEuovrGFO0eDAaK70KN+70msr0w0yDm/X8mMskHx1/BtVMuPHkuTL2wJWlCPExGbj8HCmkYKgZZodpjU9WbousyRQsFRx41Cgv6KSydcqklp2DUzi9g9NsOFcXbjYROwviOCXCxqVw1ZN1q/Jn7ZLJ81wbATKzpxtV273OYeUaylhexk+zbgM8eEUwVgD X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: e9EidO88OM2R2kgp+a0mVLLRQkM7UFq3HbsaYBX4ovexXUg/UnT7bcHXuxybsGzNdoGwva4iIM8TtffAm3+rFQSxLVIzl4VkFpiF5n/b13KKy848R/T7Vs7bDngKRQ3SKdgbiHalLdgfRUICxXv11kyjJNMUIkNWHruzAqG4UMr14S9tlwdLf43UDLhvls5zoW8XYQvRPww6wjFpQkoB170xIf4b98R60dCsGmH6wVrBzazlqtsn0yhY0TDH8T2YtIwpbnxE2/dG27LFqLzWKEI9mn+ng38N1sa3ZBthO+oa2sJ95lWQ4/vWssWPb3NvhhWd6dcBgVGF3LBAFr8nKzUFYE8l3x7SPg9OPxI0Y7fXYQoCtd79ohneX36qW/iEqZGq47AlPuqZMs6Nx38eqJu2N2NyQgbyJDvSdM7uMR2NjMGJ4f/vJRztVnt73eusKgLjdqUjyHY4ekSCn7goe2FLKGZC5InSJnEobPNmZF0VO1r3fVRfPVtHrElkcfSMl4Wfb0JX5Y0NWgQaIUcQ3e1Kzo4q7ojV6t/NDymawKU8a1LuU28JigSQe9EvSTIX2DRaDIh6WLa5y5f7mVWdeIGhDbtYAPtihUPgBvOL8p2ljzZtIKHGlC2HqTn/oWpiaq/dwWgh9orfXpf6f1lGmI1VQ84PSv1MH8UG/HwWRBvydfsILKbBYsu5yRoztu/tnnci5tsEU+pGjpCrha8as/1kHjdSkynEcyYogKaj2N3AKA/4diBl0YkBXhKsFkjpAXsulZNWvYNGN0K41UnF4P7tgZap7HbyZ05t2jhx95PZF6UQjtNw8M+xshwr1rrr+81oeFGpoH65w+af3RgM/8gvDwo19khCaDudVqYGkVGw1H71kkDVEb0aXYFUJmaUnowP8F/L+VaLgk6QuSN0Gi+zHCAr2Mf1JVWW8MUdUhA= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbf77f8f-8a15-4765-cf88-08db2fa40fb1 X-MS-Exchange-CrossTenant-AuthSource: CH2PR10MB4344.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2023 15:49:48.9038 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1DeGAqCfwVUcgmtd/BUPJaJuRugQzXDHzE3H/BSp3PDFY/XDSOZdR8V3b+QHzv4AahxU73gW63H8+JzcC7UyOw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR10MB6563 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-24_11,2023-03-28_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2303280123 X-Proofpoint-GUID: fZpPfhwHmz76czJu9WrPfyPdFzc0Ecul X-Proofpoint-ORIG-GUID: fZpPfhwHmz76czJu9WrPfyPdFzc0Ecul X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Qing Zhao via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Qing Zhao <qing.zhao@oracle.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
Handle component_ref to a structure/union field including FAM for builtin_object_size
|
|
Message
Qing Zhao
March 28, 2023, 3:49 p.m. UTC
Hi, Joseph and Jakub, this is the 6th version of the patch. compared to the 5th version, the major changes are: 1. Update the documentation Per Joseph's comments; 2. Change the name of the new warning option per Jakub's suggestions. 3. Update testing case per the above change. these changes are all in the 2th patch (2/2 Update documentation to clarify a GCC extension). The first patch (1/2 Handle component_ref to a structre/union field including flexible array member [PR101832]) is not changed For the first patch, As a record, Joseph has approved the C front-end change, I only need a review from Jakub for the Middle-end. bootstrapped and regression tested on aarch64 and x86. Okay for commit? thanks. Qing ========= Qing Zhao (2): Handle component_ref to a structre/union field including flexible array member [PR101832] Update documentation to clarify a GCC extension gcc/c-family/c.opt | 5 + gcc/c/c-decl.cc | 20 +++ gcc/doc/extend.texi | 45 +++++- gcc/lto/lto-common.cc | 5 +- gcc/print-tree.cc | 5 + .../gcc.dg/builtin-object-size-pr101832.c | 134 ++++++++++++++++++ .../gcc.dg/variable-sized-type-flex-array.c | 31 ++++ gcc/tree-core.h | 2 + gcc/tree-object-size.cc | 23 ++- gcc/tree-streamer-in.cc | 5 +- gcc/tree-streamer-out.cc | 5 +- gcc/tree.h | 7 +- 12 files changed, 281 insertions(+), 6 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-pr101832.c create mode 100644 gcc/testsuite/gcc.dg/variable-sized-type-flex-array.c
Comments
Hi, Joseph and Jakub,
This is the 2nd ping to the 6th version of the patches -:)
Please let me know if you have any further comments on the patches, and whether it’s Okay to commit them to trunk?
Thanks a lot for the help.
Qing
Begin forwarded message:
From: Qing Zhao <qing.zhao@oracle.com<mailto:qing.zhao@oracle.com>>
Subject: [V6][PATCH 0/2] Handle component_ref to a structure/union field including FAM for builtin_object_size
Date: March 28, 2023 at 11:49:42 AM EDT
To: jakub@redhat.com<mailto:jakub@redhat.com>, joseph@codesourcery.com<mailto:joseph@codesourcery.com>
Cc: richard.guenther@gmail.com<mailto:richard.guenther@gmail.com>, keescook@chromium.org<mailto:keescook@chromium.org>, siddhesh@gotplt.org<mailto:siddhesh@gotplt.org>, gcc-patches@gcc.gnu.org<mailto:gcc-patches@gcc.gnu.org>, Qing Zhao <qing.zhao@oracle.com<mailto:qing.zhao@oracle.com>>
Hi, Joseph and Jakub,
this is the 6th version of the patch.
compared to the 5th version, the major changes are:
1. Update the documentation Per Joseph's comments;
2. Change the name of the new warning option per Jakub's suggestions.
3. Update testing case per the above change.
these changes are all in the 2th patch (2/2 Update documentation to
clarify a GCC extension).
The first patch (1/2 Handle component_ref to a structre/union field
including flexible array member [PR101832]) is not changed
For the first patch, As a record, Joseph has approved the C front-end change,
I only need a review from Jakub for the Middle-end.
bootstrapped and regression tested on aarch64 and x86.
Okay for commit?
thanks.
Qing
=========
Qing Zhao (2):
Handle component_ref to a structre/union field including flexible
array member [PR101832]
Update documentation to clarify a GCC extension
gcc/c-family/c.opt | 5 +
gcc/c/c-decl.cc<http://c-decl.cc> | 20 +++
gcc/doc/extend.texi | 45 +++++-
gcc/lto/lto-common.cc<http://lto-common.cc> | 5 +-
gcc/print-tree.cc<http://print-tree.cc> | 5 +
.../gcc.dg/builtin-object-size-pr101832.c | 134 ++++++++++++++++++
.../gcc.dg/variable-sized-type-flex-array.c | 31 ++++
gcc/tree-core.h | 2 +
gcc/tree-object-size.cc<http://tree-object-size.cc> | 23 ++-
gcc/tree-streamer-in.cc<http://tree-streamer-in.cc> | 5 +-
gcc/tree-streamer-out.cc<http://tree-streamer-out.cc> | 5 +-
gcc/tree.h | 7 +-
12 files changed, 281 insertions(+), 6 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-pr101832.c
create mode 100644 gcc/testsuite/gcc.dg/variable-sized-type-flex-array.c
--
2.31.1
This is the 3rd ping for the 6th version of the patches.
Now, GCC14 is open. Is it ready to commit these patches to GCC14?
Kees has tested this version of the patch with Linux kernel, and everything is good, and relsolved many false
positives for bounds checking.
Note for the review history of these patches (2 patches)
1. The patch 1/2: Handle component_ref to a structre/union field including flexible array member [PR101832]
The C front-end part has been approved by Joseph.
For the middle-end, most of the change has been reviewed by Richard (and modified based on his comments
and suggestions), except the change in tree-object-size.cc<http://tree-object-size.cc>, which need Jakub’s review and approval.
Jakub, could you review the middle end of change to see whether it’s ready for trunk?
3. The patch 2/2: Update documentation to clarify a GCC extension
This is basically a C FE and documentation change, I have updated it based on previous comments and suggestions.
Joseph, could you review it to see whether this version is ready to go?
Thanks a lot.
Qing
Begin forwarded message:
From: Qing Zhao <qing.zhao@oracle.com<mailto:qing.zhao@oracle.com>>
Subject: [V6][PATCH 0/2] Handle component_ref to a structure/union field including FAM for builtin_object_size
Date: March 28, 2023 at 11:49:42 AM EDT
To: jakub@redhat.com<mailto:jakub@redhat.com>, joseph@codesourcery.com<mailto:joseph@codesourcery.com>
Cc: richard.guenther@gmail.com<mailto:richard.guenther@gmail.com>, keescook@chromium.org<mailto:keescook@chromium.org>, siddhesh@gotplt.org<mailto:siddhesh@gotplt.org>, gcc-patches@gcc.gnu.org<mailto:gcc-patches@gcc.gnu.org>, Qing Zhao <qing.zhao@oracle.com<mailto:qing.zhao@oracle.com>>
Hi, Joseph and Jakub,
this is the 6th version of the patch.
compared to the 5th version, the major changes are:
1. Update the documentation Per Joseph's comments;
2. Change the name of the new warning option per Jakub's suggestions.
3. Update testing case per the above change.
these changes are all in the 2th patch (2/2 Update documentation to
clarify a GCC extension).
The first patch (1/2 Handle component_ref to a structre/union field
including flexible array member [PR101832]) is not changed
For the first patch, As a record, Joseph has approved the C front-end change,
I only need a review from Jakub for the Middle-end.
bootstrapped and regression tested on aarch64 and x86.
Okay for commit?
thanks.
Qing
=========
Qing Zhao (2):
Handle component_ref to a structre/union field including flexible
array member [PR101832]
Update documentation to clarify a GCC extension
gcc/c-family/c.opt | 5 +
gcc/c/c-decl.cc<http://c-decl.cc> | 20 +++
gcc/doc/extend.texi | 45 +++++-
gcc/lto/lto-common.cc<http://lto-common.cc> | 5 +-
gcc/print-tree.cc<http://print-tree.cc> | 5 +
.../gcc.dg/builtin-object-size-pr101832.c | 134 ++++++++++++++++++
.../gcc.dg/variable-sized-type-flex-array.c | 31 ++++
gcc/tree-core.h | 2 +
gcc/tree-object-size.cc<http://tree-object-size.cc> | 23 ++-
gcc/tree-streamer-in.cc<http://tree-streamer-in.cc> | 5 +-
gcc/tree-streamer-out.cc<http://tree-streamer-out.cc> | 5 +-
gcc/tree.h | 7 +-
12 files changed, 281 insertions(+), 6 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-pr101832.c
create mode 100644 gcc/testsuite/gcc.dg/variable-sized-type-flex-array.c
--
2.31.1