From patchwork Sat Feb 11 00:50:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qing Zhao X-Patchwork-Id: 5266 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1260775wrn; Fri, 10 Feb 2023 16:53:51 -0800 (PST) X-Google-Smtp-Source: AK7set+8w3R4pij5LUwstHC4+2PUmq0gyDGNkwt9TzbKtW2B/g+FaELRTxeL/y3n8Ph0dDky1tcj X-Received: by 2002:a17:906:a006:b0:88c:7a36:d11e with SMTP id p6-20020a170906a00600b0088c7a36d11emr16369957ejy.25.1676076831547; Fri, 10 Feb 2023 16:53:51 -0800 (PST) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 14-20020a170906008e00b0087777bb4127si7492577ejc.172.2023.02.10.16.53.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Feb 2023 16:53:51 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Mu8Cgd9s; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5A158385781A for ; Sat, 11 Feb 2023 00:53:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A158385781A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676076830; bh=HpiXI8UC9SB7b4gxo5R8m+atErzwLpn0M8OdZT3Uqjk=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Mu8Cgd9sTQ525wDMYE1zUMa5UReWVs6D2PdDXMGLKbnSb64mkxP8M679CaiDX4ZVa etwQiOYrCWTHqPNb1teFgqmjpwUt4C4aBGGJYdcPoVhtubRSthM/oh95TOovxp2D7a bH/YFmNKopkmr3kEfz3ymEYE84zv6FJUwz3LCLcY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 2BB10385841A for ; Sat, 11 Feb 2023 00:50:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BB10385841A Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31B0OoWT032445; Sat, 11 Feb 2023 00:50:22 GMT Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhfwuegfc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 Feb 2023 00:50:21 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31B0KcJ3003027; Sat, 11 Feb 2023 00:50:21 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2105.outbound.protection.outlook.com [104.47.58.105]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdtbf2fx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 Feb 2023 00:50:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BHCyDTgRPrU+P7XFGWX6O0RHtWyKcm5n1JJsKzwnZQ5Knz/Q7KO8VWtWJqvmVDcxTSKQSAqTTg+dclS6AqUoiFkmqPBv3HIw5P4f5DEBEybmbIfNZklpkb+KTpTZH9Aw8WpnaK94kvkJQJpHir+D5Z4JveJ+kuWsH3QJD/NEtaXugqh5Ouvvkj9d8k7UVKwsh3ky5XbrvpjzfteEaRYtvQn8ssK27A07AKYtiI3Ci5vhuy2Hs54SkdxHqfD5sK9XI+qXbNJSf7/etirm0c04ue8dD6zh/5OT+O0JLx2vglK4GGTXhs/FfpS0EnLjZNQzJKeQNtj4gy4UGttHtBLOvA== 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=HpiXI8UC9SB7b4gxo5R8m+atErzwLpn0M8OdZT3Uqjk=; b=erv7pVGa5CrjRq6apZ3LKjmvQyo5UFoeNfDz/J0evs7NjarnixdzdibVON4j/AGWQIgPuddcWqfyCIrdPsx8jVXDtLbDxE2N8OTNFzRo6ByuLEFw8Nr207nJUVOsbVnrvCPxXqO+fQ0CWSr5cT2qwyw+rdUDXnY6PchCKXdKh0qxcPL9onZGS9c1SMKDevfiIfoLgMFiNrDc2sifIOJGnIIXpPYF4MDXkz/yGlHdkl33rbwvQtec113SfHj8Eg4oEIm7oBBRUewNLqs6mpI4Q4+z+zda+u6NBkfBh8S1yjjSoH5j5IXB4GlujKchB8Tf09zYMmS/3NLq2ExO4yAUbA== 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 DS0PR10MB6176.namprd10.prod.outlook.com (2603:10b6:8:c0::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.7; Sat, 11 Feb 2023 00:50:19 +0000 Received: from CH2PR10MB4344.namprd10.prod.outlook.com ([fe80::7030:ed2e:20d0:cd5b]) by CH2PR10MB4344.namprd10.prod.outlook.com ([fe80::7030:ed2e:20d0:cd5b%5]) with mapi id 15.20.6111.007; Sat, 11 Feb 2023 00:50:18 +0000 To: joseph@codesourcery.com, rguenther@suse.de Cc: siddhesh@gotplt.org, keescook@chromium.org, gcc-patches@gcc.gnu.org, Qing Zhao Subject: [v3][PATCH 0/2] Handle component_ref to a structure/union field including FAM for builtin_object_size Date: Sat, 11 Feb 2023 00:50:11 +0000 Message-Id: <20230211005013.789161-1-qing.zhao@oracle.com> X-Mailer: git-send-email 2.31.1 X-ClientProxiedBy: SA0PR11CA0094.namprd11.prod.outlook.com (2603:10b6:806:d1::9) To CH2PR10MB4344.namprd10.prod.outlook.com (2603:10b6:610:af::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR10MB4344:EE_|DS0PR10MB6176:EE_ X-MS-Office365-Filtering-Correlation-Id: 6aa51568-95b3-41ed-23ad-08db0bc9f25a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JpFvGKHEvTRDtHPy+mtYKV2wYEr/S1oYkedISo7a1bWLKTHMoPKOSS90NDm+9KfrcDWbN3Zo8vy++mhgOqF0O4ecvg3w2MHUzAP8bEfba7pMdj7eLs5NFTMWFfNglPFVXWSnqWfgyJNA0QFZktOaTO9mGANJE+K4Z5aMwrFb8uEsUYuKneGGQ2jUbMRFCN1hNb3WjEWIXUlJcX1Ahp6/W+/Oz4gWnczOw7AlkfKDqWAZsQFb4g42uzegSlSIb29SEvP7km40FZkPY87f9aY85ZIyzoADjBeAVC6AY0v8vO4xDmSBz/R5siDKTiJHA0FH49bt4ZdCK9+elgJln6kc3+2p8dXwuSqRwb9BhXaDSXd7ZF/E9rnazu/3nm+V0rzcXqOZRve1nav0bBfpGBqZDQjaY8M6H1u/ZNSxFxtNGc1Uaz6ju9gNb1Zz/VA42aTy6L6TFXzzciEnWpc7pgSAfLTJyCwgwpm+otpmkhNwNB78fwmLDb4uTn55S6ZAU5FG3GA2rc67sdZsSG/z2Z4daSKskXRmZC/EIY0mLsKJTJhOYHelJbQwNB5E/ua5+qjNVwK64EOfFbB9P+fN6Cwsr3TeCrRvaUGcYn4uo5hccbdBEYkQICDrMBiY18gHjVAN58evrQB9DJjMS85HDuPyvw== 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:(13230025)(366004)(39860400002)(136003)(346002)(396003)(376002)(451199018)(86362001)(8676002)(36756003)(44832011)(4744005)(8936002)(41300700001)(5660300002)(4326008)(66476007)(66556008)(66946007)(38100700002)(316002)(83380400001)(6486002)(478600001)(2616005)(2906002)(26005)(1076003)(186003)(107886003)(6666004)(6512007)(6506007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: T8k+agG7vb7rbDNfCBnkdGJmZIqEZTvFjdjNsAiiN+S5RqHbX83pAWXvRfN0CMMy4U9SfWWzeOXsjKwJ9NONUOUxAHMnlBS4qZXMc3BQTHMvu9wpRW+RnyBLDglyE0Ua4EJC1lwrLTWQ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CE2w8caBQtG4L6P7xUgZgun/LtSgw7HtrDJhW8mcNKqiq1nQa7+Dk7z/8M7U7SlCFpucI727a4h5jMEqgMH+ZDyI99RS182ltU/PkDtXymNcilmI/CgkW25cZAlmKigfh8PMozSH/T1q5f1cvHLBrTXZmYl1OZtcbzFoeyfSZa9nNAXGZ6VrEPj5npVL14aVT//KRMcpRzxJMAIjxBBrnYOZPFI15FutobOLB4KZjr30seuLzBCMp6RJKfb8dlZUIVixH8thEzdX9pBXmAVjoiQqbPFupd2JExI24Rd/PHgNvDyUwcUvQZs4thm7A9EHzIWuviJkM2PHnxgrq5f+/G4GgV/yPMQUdV93s7vX0OX6McvwRhYkta+CL2q X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: u6BOdTyidP+pcY4eD2TeLNKaJp9kdWu6WBtG0B2lZ5G3ECnOjGchKD2hdpqvQELD+sED6srPbMul2349mUOOlxSIkp74PyIt+o36nHaKokn5H/01FXYyRXQwB0ruT4ljpSFTVb3A+uJ6jFOzKAooYMHzBX1wkywc/6ccX9BtyDMAECDr+Aa76vT6lkDyWAXVYsJGK60PnIw5Xi98qWOlWCJpqvg3VXnojW4HD+rYAm4P2JqF6c47iYj4gciftSBnvMKwA1LRcPVovIBQxBHXKMBSTz+0ofix8MK2ZNwJu1h+pAd1CMKqTnlNecjMBWyXGtWcDctr2UyVOgkOmXyaJk9puJV0SiaLFzwz+C4KajKhj6rSC3E+hW4AhIncVT3yO+q1FRZDW/9ngd69s8G4MNdEsl7uJMnS0lXheHRhyWCpTTp/5HT2UX+/jNrpoqeyC1KwSV+gqpnl6wg7hMOg9Weo0ywNwLlpXhICeDg4uQibBoN+5DS0Xv0rBOsCjIPp9h0BYBKqD9mK3nsBuo4omeN35mix9ek+SaeCi/CBrnlQlClXbm5qNtJI16IW7GNzqY8wa0TSfqIvkBJDoqM0CLAHZM21lXTgjLT8yZQUhVRYkmIsdNgcZongiDBFUpxVLF/b4YV4nP8YL1Lfj1lpABsQ1nge4B42Ocxf/jsTtGLeJ9kyIQA+QjjPOi9ww4wFY5TeZk+/N56iLInd9NyMyqjhDJmR3ERZrVUfLeTOwGCzv9Au+UPQIieUL8jQUulCXZWdXCJJhNjAa2Z8d4L6FXh0f98kEdXrmhlLK2EDINmuIucJCG+kUFCy0707HGw1a0dAYcmWuDo7z3/LLnrtmFciz7MulYvF3jSwm8wr5N0RAc+G0Wns5rT5Em/rzvoT X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6aa51568-95b3-41ed-23ad-08db0bc9f25a X-MS-Exchange-CrossTenant-AuthSource: CH2PR10MB4344.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2023 00:50:18.6789 (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: rD1GymHrmQ2dwZdcGQWT+ZnYLC2tc20Ilr0ajXqA4NdMNqDJ6mZ2k5VKZqd55Yw8yGZzZdUdJDpXc5HQb+tPlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB6176 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-10_17,2023-02-09_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 mlxscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302110004 X-Proofpoint-GUID: K1LXxdySwxB8S6WbK_LtaWuQJhFbqZQW X-Proofpoint-ORIG-GUID: K1LXxdySwxB8S6WbK_LtaWuQJhFbqZQW 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Qing Zhao via Gcc-patches From: Qing Zhao Reply-To: Qing Zhao Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757493939624139639?= X-GMAIL-MSGID: =?utf-8?q?1757493939624139639?= These are the 3rd version of the patches for PR101832, to fix builtin_object_size to correctly handle component_ref to a structure/union field that includes a flexible array member. also includes a documentation update for the GCC extension on embedding a structure/union with flexible array member into another structure. which includes a fix to PR77650. compared to the 2nd version of the patch, the major changes are: 1. only include C99 flexible array member to this extension, trailing [0], [1] and [4] are all excluded. 2. for the new bit type_include_flexarray in tree_type_common, print it and also stream in/out it. 3. update testing cases. 4. more clarification on the documentation. warnings for deprecating the case when the structure with C99 FAM is embedded in the middle of another structure. 5. add a new warning option -Wgnu-variable-sized-type-not-at-end for identifing all such cases. bootstrapped and regression tested on aarch64 and x86. Okay for commit? thanks. Qing