From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 543B43858D1E for ; Tue, 7 May 2024 14:02:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 543B43858D1E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 543B43858D1E Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1715090581; cv=pass; b=buwmidylRRscK6RgV/pBzoZRTIRPj4U2V2N7eZO8IBKEnTg0ioN3Qnp0PP0AyEwan4upW9EmObEs74LjIAtRNb20wEAPcGSt5xAfqflTPwcY6MhTSVLe4bF7HHBR87NjA2+oE3hI5ouvQTBhdktJezayXZyZb672f7I3TRYBJqM= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1715090581; c=relaxed/simple; bh=i0lzXpbS1wNN7ePEqxBK2Zy5+43tWBquBb1Ukrgq44c=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=sdIo7m+6V5Ct8/ZjnCVp+QJEq5x0JmShKpeXsEJ+1MK0AgNa8FWMoBEUAkcF2IA3ZVxMH7VZaSGaJ1TDJHvcwYhU3sP18hZSQ2ghoo5/jj62IMBZn2BRcNw/E8I6tuZBFgYu9IbzcydZQeu2k0AwiHofXhNVIHcPxawo/ZTES+A= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44794OG0031270; Tue, 7 May 2024 14:02:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : content-type : mime-version; s=corp-2023-11-20; bh=E96VG65/KTX7WlnQsICbVajOTW7WGAkFbaA6HFL8gdI=; b=KqHlfalZXn6SSKfM36vWoevkvfwSNbV2gVp2DiN5lXVQ7xhDs7wH70AZqoJFp1H+Acmt j9+yuPQQFDbhKqpYxsyMZm99Ly5cpP3x5D/nSJerMUXc6/5cOvYElcxMVjThnwnlgLaB KnijYtfSBfMydW8kMQxzKEYjyZtPoBktzJUc90NweyhoETLXYZG74u790kYF//nHcbFt lFlGRN/C+ADN2aATk8MphmdLle7LgDUTbLY7O4iFMMyhWo0VeTA0h8FQrEFLqs6trS2N y8n9vRqAf1VWO9/fLNd0w3COVn04/8IBQJYCxHekHxmPjXs+DT0CIN/zZkgV924l9X45 HQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xwbxcw3vh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 May 2024 14:02:47 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 447CJLFh040858; Tue, 7 May 2024 14:02:46 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3xwbf79f7g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 May 2024 14:02:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CAr1lTXl1A7gy+Nq4NgJOM2DY6KRMw5bq9v4FCw/5GuBVNOW5eDYbzqTwHny1GLHRjc+onmd+4COV26pBxhWC44E4rtwZKuCjqDOyJxodtLVPaCURJO4meTAWr2luNqcy9rCI+7HdDPeIo5ohXG1qvxkJpdDkIiC7QlwRUqqGJVSklRezJbSf0cY+SC10nay+vTUlGWM4exc+Z14NObgZef1l1M/4Zmpq71HlvI6kqwrqlhTcxIWcJAmzn/CxznZAm4d9kCl5fmwxRanfsklKM4WTOkmxfO1ALLwkTC/1XEm09FG1A14edVNfVQPmkLeVhFFJlCFqBYhXnlzWJqRTw== 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=E96VG65/KTX7WlnQsICbVajOTW7WGAkFbaA6HFL8gdI=; b=mu94PCHU+Wi+L69yd4XDl7kNO7YNNYbNTWFUhWSxAlD3pJdTgdw0FaRy7PWUcvK4On2IFBDlWKyW1+hhJc0pPNn0l/oKQsEBeHJhVjBiu5w5++yGwPtfBKuMalJSpxPrHBdTkMjrI0FFw8TkLI8tOzk92LvcteF+69SURlkZYsU3thXvUbXOqHqFh6+AS1+h+VlT2SH6cg0NETIguqmMIuWcpdwfcUHZM9J/8aUMvy/L0GnbczB4cAp1LlAIAmIyQkzf7adv7avdKPy5C4RxQc79bWgY8DInxRqVe57pxReoPbY2WQROp4NpssTYZwvUy7ssygFzi2a6HyJRYCwnMQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E96VG65/KTX7WlnQsICbVajOTW7WGAkFbaA6HFL8gdI=; b=KOmj58CaE13I2LBvqy0a0ZWKHBNovtzJy9emrO/GCcA23H3g1VyjTKzv03Sj4JZiXkX4eGC3T7VzUridZe8PXJ/yY3YIdqQsg7e4fb1kvsgi2Jl3CMwOhwMNQSofh+/lGHjvF4Ng4bO8htlSvYGi1V1hciu9Ik52BWVnnd+erAU= Received: from CY8PR10MB6538.namprd10.prod.outlook.com (2603:10b6:930:5a::17) by CY8PR10MB7146.namprd10.prod.outlook.com (2603:10b6:930:74::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.43; Tue, 7 May 2024 14:02:42 +0000 Received: from CY8PR10MB6538.namprd10.prod.outlook.com ([fe80::8a:61cd:764a:e47]) by CY8PR10MB6538.namprd10.prod.outlook.com ([fe80::8a:61cd:764a:e47%4]) with mapi id 15.20.7544.041; Tue, 7 May 2024 14:02:42 +0000 From: Qing Zhao To: Richard Biener , Siddhesh Poyarekar CC: Joseph Myers , "uecker@tugraz.at" , Kees Cook , "isanbard@gmail.com" , "gcc-patches@gcc.gnu.org" Subject: Ping * 2 [PATCH v9 0/5] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896) Thread-Topic: Ping * 2 [PATCH v9 0/5] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896) Thread-Index: AQHajODzBJ2yZVu8jkScUH4cztMncg== Date: Tue, 7 May 2024 14:02:41 +0000 Message-ID: References: <489A3D87-437E-494E-9200-8A0B28EB6AE2@oracle.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3774.500.171.1.1) x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CY8PR10MB6538:EE_|CY8PR10MB7146:EE_ x-ms-office365-filtering-correlation-id: b51a6f90-1719-4544-b5eb-08dc6e9e5c8b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230031|1800799015|366007|376005|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?/GnYw6BR+XYbJtDZMUFJ2mabah/32zIg3v22oOM88S2jBrrl7I/Elt2Q6HKU?= =?us-ascii?Q?C357TfuTuV48jyotgXyO5gQcGV4//iH6KvIGgu/DqUul+gve0qOE+7yvKrh3?= =?us-ascii?Q?kxyoX0P2/XndzrvwYAuAYhdaE7Xi81sGohKn5cibLcWum0bMzy4QmnsTCMtY?= =?us-ascii?Q?u6lAkyoyMvOV3Asi691qfLykjIOGW0kjYXefkpuX/gqFaFSW4gtcqUsieRsM?= =?us-ascii?Q?T8GKCl6nhECpTV0NqE2bi2LA9OIbl/V+0J3ZMmD3OB+CmwaxP4YjghEAwbcL?= =?us-ascii?Q?xeDibLFsrQqPgY6YqN+NSFosszZUBI2c4LzHuur6ofLY9hcPVK890AGqIQmm?= =?us-ascii?Q?C9+JjO3uEKVHji1K42U0eg0iB+3SB1tep7kBvEow8PVSWQLxqBGb05SjUKQ8?= =?us-ascii?Q?y+Xrb0Q1Wfd28NXf/fSMkP+VMzF3qu93PU7a5vhsrd3vGTQra1EW0Cn3PkCq?= =?us-ascii?Q?l2Ahrg+8bq7vk8wQH8p0O4NFhAQ8mdCWHvYbFst6mW5klQerhRGlPzPEna4V?= =?us-ascii?Q?99PMyf0RuXH2ckKzOvhuDNcaD95RbMuzgjw8QcaKrwvABveeXLPnmvX3V+J1?= =?us-ascii?Q?EMS2lK+m3hRJ1j9cZkYOo4GfJGEDbMJJkF8a/eAKPqxgcHACgXaUHVszdVu6?= =?us-ascii?Q?QOnCw300TVC9+5u1jw13VCHFWNlGU4sr6m4Alb9QpUPnVDcKPEa4E5RteGIV?= =?us-ascii?Q?U05qI5gwN00C/eQAkzhtwjYFjlqXoV/m0ciawDij4XJaZ8uvh2tbsBL7D8jl?= =?us-ascii?Q?PDVv/4K/gaUlIVDIwwOq5f9YKjbpHa6LIWHD20ObDky2xcxmSCxUURKMsqcm?= =?us-ascii?Q?ChRmanFby72WDVDIfgGi//0lHk1u77InXzZI+cpz0KBeqN1kUg5GX9jZLESp?= =?us-ascii?Q?Xlg6CmrAKOgZfZ+eSw/Y94bUcjK8iQ4LRZRBX7eWJ/kWzdj7j3MRmr4Hkbdn?= =?us-ascii?Q?iDrl2jCAy98xL/l14wk5GDLqPxToctjJBvPdelvFp4m2L30bMVY9mJbG7SGj?= =?us-ascii?Q?dDwAuIVWR/Gl9CwD5PJ/29CdpPaQMYtDpl1sFF3ZYZei5GQbOHSS1iBlhknA?= =?us-ascii?Q?M262ArrgVblKw2qQr1tEcTCdmsz3/pnLbTjX15GldgxkJ2cKFss08Ob6HVag?= =?us-ascii?Q?rrdfpu3gZvvAaUkltkdqyHkFwUcN1BI+axYdj33iytP8Y/qbxHKbycuhjpg+?= =?us-ascii?Q?pNj6KJD2GuGV/r7SiGOD7eLH7jqD/y1QtgbrtDKeEb+7PpsWCDof5ERUEGin?= =?us-ascii?Q?AYWqpm7Ae+uiFD7iy5z+c9klGNP5i1eMJLwmTBdN5LWMGVQRKvN7nGh7Iw05?= =?us-ascii?Q?AXw=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY8PR10MB6538.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005)(38070700009);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?FzPv7QiqX1JEu22CFRJhouQPxi2lk83HaTeZesmBi+H5RDjfQhdpxOsIuJPO?= =?us-ascii?Q?PPmotOMheUUjAiizN1o5DDOHq9FFTUo0n5IqGmSY+Qk5ugp1ZAyiHs7O0yEa?= =?us-ascii?Q?pp6PDdCIXY2qufdzVB9fAFGGp2rWls3r4vEWSqaDRZsELtM673ET/dud+7S5?= =?us-ascii?Q?jee1WvDqRy9No20sYa4IsPTApGbC2ftANEOq0ENQGRv4F1iPZjjqTCXWnG3W?= =?us-ascii?Q?QrVxLTKc1mrCdwDtCXWjAAzpPjEpGGsdL+LjkNd0ggKojlnj5uYvYIfSafG5?= =?us-ascii?Q?K0soBvPeV0EtiaHrqSotxj0NdKV9lOVZ0bMeIcg4Dui8B/Y2KuZ6V3dZePgk?= =?us-ascii?Q?BHPhg3Ta2BxGYIH2iJwZ2ls/b1mbCG2ffEFHhGQ+p7FMnbhjYjYGso22MPtZ?= =?us-ascii?Q?eh+kLHI2hF0FO+oLX7o1KXiX6hf8DOvOAJ+zOq88Cr3at9CpoiFkrBx6rFAY?= =?us-ascii?Q?pNxEq/Q+jwBBNE90oQ4V64yBxywxxbOSukHDMtLPFYoRgPLrP7xdOsmfuVzC?= =?us-ascii?Q?quVHpAUbydHp6JNydv8mjaVuI8xbtb9aHDiIDRAM8syy6+kyHpD10vWCduzG?= =?us-ascii?Q?cWGdCWLBTy5Wn/BBpU5nbrXOH0FvVRpFslc5bLAJmw2RJKqf31/pFOeKd0La?= =?us-ascii?Q?bO+dViVNe4QOnEK0pjPGYEmgJstPQeFhyqKFrzZKw38xV1ysrDKEkdJLyG1j?= =?us-ascii?Q?6cgvG8hRw8B+BhxhHvp6ao7UXnR46tRUSyajzZqoWFwoir6VTUdYWMvL/89x?= =?us-ascii?Q?Wd/GKTTEE5zygK01JnLm+0cTJ1iXWDcjqIWujxG1itmmldGISK2u1lOLjCfz?= =?us-ascii?Q?raDcFn/inaaqYP6OY6TNq/SlbgnccuUurB/GooVE/xcLsOkEA9+F2zoXe2OK?= =?us-ascii?Q?dIx1ChclorzuHOhPORxRgEOhMkop8KljdwDXUMM1PRICorXKqltv2HtZVPa2?= =?us-ascii?Q?IymKR0vIEUtkS0n9TBpU26wk0pm5+NdzPoSl6Kn94e9ZUDCT66A5Jxzv5eQV?= =?us-ascii?Q?V2U8PG72ZJZ0oSXXFP+QLTbsaF5Jz956jCB19rzsrXFwpO/hnuOdDEoxNLiF?= =?us-ascii?Q?92jawzXnF/aXtI1urr/BmQVxQzXhd56f7qajYIxWJIgJh3RSsyZ1PapXswlf?= =?us-ascii?Q?fNTwGl4lFDWViOZJselLdJMPjo7vkHqevhKOM9zGJZcgWcqZGjuS/ZLTahFB?= =?us-ascii?Q?orAX4seP0SPhdfkO7GgTMNxWxYD4DO5DDnbcgUA9HxXaK31gL3WzxsV3Ox9r?= =?us-ascii?Q?vbCuTukgkwVvDoUU9/0Ti5EVr+kzWPrDiF3uwUZzl04ndOcmtzo74Zd+IWLT?= =?us-ascii?Q?Mzi7itqpaXUQOAI1pzEixmqF27zGUzGXTn/kfl8UZqzmYWUEByVONUK/V5Y2?= =?us-ascii?Q?MKn4GOM+WCIJ0wrtRFlQbXs+AaHMWF/i6iEK24Sjm9o5Hi/4mGmYxFqTRp89?= =?us-ascii?Q?IOPzMrngNTzbJZ2dXsMqRrVDH7v8lL2ySQ4oWmXi68uBexPgRFxH8fYLak7w?= =?us-ascii?Q?b7w2Qn0hk2ffJgI20rm1od47sgCGoQEpb1OGFApKKlAwSJNrNgSqjw8WIbPl?= =?us-ascii?Q?yAG8Vz4d7llrc5s8aHnPJAuBxdDhQRX9UzLGksLHP72LVMPY64ETh7TqWDuj?= =?us-ascii?Q?rSn5rJXKTV/MxVpX/SHCnRs=3D?= Content-Type: multipart/alternative; boundary="_000_AF1B4C3636D543968A777064515F9C4Doraclecom_" MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: y1DzlsPjn2TC2un1aWfM42mlORcENypnjDDdWYqod2m+3Jx1wFn1ArjK0W0qJVUJiPs7IRbAcfOYWBeq5Y+a+A/D4YTWv5n8w5PY8SCptExaqXNF+ktXqQVldMcQj7buagClEvKcdeDBiKGxaubgsNi9i6eVUBPxtfnajCnWqLA9beiAwdaPOZ31EDzAWHbVDQmm99qqlgrNuXgHuQLXnr4OaMDMuYAHMkV+smFFP541z7SoAgYmA551KNtS+E++PGk0Rk62afguK/YUl6wXXMPa9zSuCIoFhH8FiKI13OLOPn/hoLm+Tyz8rcrQEXOK/9AZ5AuGFe//bI6ptWHq5/ktodTGi59ZNWw20piVFRdh4FhK3i/VfmNDKKI8WwIK9U1+y9FUaA7now7+EYuzXsNYavI5Punav/cKkYLRk6npxETvAtuPEQCBiXkKrcCiE42Nx7aluuT8HG0rDeUfe41GnoIMFFuVwXBPy2YknxxP6YO72Qm3PBVX3kBFMpl99QWFuSEuphPULeNNFg9CmnUpp1iqtD8I40RQGU6Xgkp1EYAV5LwEdiA8wsr2ncqVwOu7GLd/6B09LMYkfvi1zzQL8O/tQ3rR3yn+sFAghA4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY8PR10MB6538.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b51a6f90-1719-4544-b5eb-08dc6e9e5c8b X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2024 14:02:41.5780 (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: 7jg9tRbvW3s+oCSjIkHbJm8FYKlKDpsFpFWxFT3oaWRLTTIVhhoEwAfq0IQpnP26pGKykCy+WFY/pW9sJ2GsHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR10MB7146 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-07_07,2024-05-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2405070096 X-Proofpoint-GUID: RTmv9cvrMGTeELGMmm774yMbTtr03ehx X-Proofpoint-ORIG-GUID: RTmv9cvrMGTeELGMmm774yMbTtr03ehx X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,KAM_SHORT,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 List-Id: --_000_AF1B4C3636D543968A777064515F9C4Doraclecom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 2nd Ping for the middle-end change approval. -:) ******Approval status: All C FE changes have been approved. ******Review status: All Middle-end changes have been reviewed by Sid, no remaining issue. Okay for GCC15? thanks. Qing Begin forwarded message: From: Qing Zhao Subject: Re: [PATCH v9 0/5] New attribute "counted_by" to annotate bounds f= or C99 FAM(PR108896) Date: April 23, 2024 at 15:56:26 EDT To: Richard Biener , Siddhesh Poyarekar Cc: Joseph Myers , "gcc-patches@gcc.gnu.org" , "isanbard@gmail.com" , Kees Cook , "uecker@tugraz.at" Ping for the middle-end change approval. And an update on the status of the patch set: ******Approval status: All C FE changes have been approved. ******Review status: All Middle-end changes have been reviewed by Sid, no remaining issue. Okay for GCC15? thanks. Qing On Apr 12, 2024, at 09:54, Qing Zhao wrote: Hi, This is the 9th version of the patch. Compare with the 8th version, the difference are: updates per Joseph's comments: 1. in C FE, add checking for counted_by attribute for the new multiple defi= nitions of the same tag for C23 in the routine "tagged_types_tu_compatible_= p". Add a new testing case flex-array-counted-by-8.c for this. This is for Patch 1; 2. two minor typo fixes in c-typeck.cc. This is for Patch 2; Approval status: Patch 2's C FE change has been approved with minor typo fixes (the above 2= ); Patch 4 has been approved; Patch 5's C FE change has been approved; Review status: Patch 3, Patch 2 and Patch 5's Middle-end change have been review by Sid, = No issue. More review needed: Patch 1's new change to C FE (the above 1); Patch 2, 3 and 5's middle-end change need to be approved The 8th version is here: https://gcc.gnu.org/pipermail/gcc-patches/2024-March/648559.html https://gcc.gnu.org/pipermail/gcc-patches/2024-March/648560.html https://gcc.gnu.org/pipermail/gcc-patches/2024-March/648561.html https://gcc.gnu.org/pipermail/gcc-patches/2024-March/648562.html https://gcc.gnu.org/pipermail/gcc-patches/2024-March/648563.html It based on the following original proposal: https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635884.html Represent the missing dependence for the "counted_by" attribute and its con= sumers ******The summary of the proposal is: * Add a new internal function ".ACCESS_WITH_SIZE" to carry the size informa= tion for every reference to a FAM field; * In C FE, Replace every reference to a FAM field whose TYPE has the "count= ed_by" attribute with the new internal function ".ACCESS_WITH_SIZE"; * In every consumer of the size information, for example, BDOS or array bou= nd sanitizer, query the size information or ACCESS_MODE information from th= e new internal function; * When expansing to RTL, replace the internal function with the actual refe= rence to the FAM field; * Some adjustment to ipa alias analysis, and other SSA passes to mitigate t= he impact to the optimizer and code generation. ******The new internal function .ACCESS_WITH_SIZE (REF_TO_OBJ, REF_TO_SIZE, CLASS_OF_SIZE, TYPE_OF_SIZE, AC= CESS_MODE, TYPE_OF_REF) INTERNAL_FN (ACCESS_WITH_SIZE, ECF_LEAF | ECF_NOTHROW, NULL) which returns the "REF_TO_OBJ" same as the 1st argument; Both the return type and the type of the first argument of this function ha= ve been converted from the incomplete array type to the corresponding point= er type. The call to .ACCESS_WITH_SIZE is wrapped with an INDIRECT_REF, whose type i= s the original imcomplete array type. Please see the following link for why: https://gcc.gnu.org/pipermail/gcc-patches/2023-November/638793.html https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639605.html 1st argument "REF_TO_OBJ": The reference to the object; 2nd argument "REF_TO_SIZE": The reference to the size of the object, 3rd argument "CLASS_OF_SIZE": The size referenced by the REF_TO_SIZE repres= ents 0: the number of bytes; 1: the number of the elements of the object type; 4th argument "TYPE_OF_SIZE": A constant 0 with the TYPE of the object refed by REF_TO_SIZE 5th argument "ACCESS_MODE": -1: Unknown access semantics 0: none 1: read_only 2: write_only 3: read_write 6th argument "TYPE_OF_REF": A constant 0 with the pointer TYPE to to the original flexible array type. ****** The Patch sets included: 1. Provide counted_by attribute to flexible array member field; which includes: * "counted_by" attribute documentation; * C FE handling of the new attribute; syntax checking, error reporting; * testing cases; 2. Convert "counted_by" attribute to/from .ACCESS_WITH_SIZE. which includes: * The definition of the new internal function .ACCESS_WITH_SIZE in inte= rnal-fn.def. * C FE converts every reference to a FAM with "counted_by" attribute to= a call to the internal function .ACCESS_WITH_SIZE. (build_component_ref in c_typeck.cc) This includes the case when the object is statically allocated and in= itialized. In order to make this working, we should update initializer_constant_= valid_p_1 and output_constant in varasm.cc to include calls to .ACCESS_WITH= _SIZE. However, for the reference inside "offsetof", ignore the "counted_by"= attribute since it's not useful at all. (c_parser_postfix_expression in c/= c-parser.cc) In addtion to "offsetof", for the reference inside operator "typeof" and "alignof", we ignore counted_by attribute too. When building ADDR_EXPR for the .ACCESS_WITH_SIZE in C FE, replace the call with its first argument. * Convert every call to .ACCESS_WITH_SIZE to its first argument. (expand_ACCESS_WITH_SIZE in internal-fn.cc) * adjust alias analysis to exclude the new internal from clobbering any= thing. (ref_maybe_used_by_call_p_1 and call_may_clobber_ref_p_1 in tree-ssa-= alias.cc) * adjust dead code elimination to eliminate the call to .ACCESS_WITH_SI= ZE when it's LHS is eliminated as dead code. (eliminate_unnecessary_stmts in tree-ssa-dce.cc) * Provide the utility routines to check the call is .ACCESS_WITH_SIZE a= nd get the reference from the call to .ACCESS_WITH_SIZE. (is_access_with_size_p and get_ref_from_access_with_size in tree.cc) * testing cases. (for offsetof, static initialization, generation of ca= lls to .ACCESS_WITH_SIZE, code runs correctly after calls to .ACCESS_WITH_SI= ZE are converted back) 3. Use the .ACCESS_WITH_SIZE in builtin object size (sub-object only) which includes: * use the size info of the .ACCESS_WITH_SIZE for sub-object. * when the size is a negative integer, treat it as zero. * testing cases. 4 Use the .ACCESS_WITH_SIZE in bound sanitizer which includes: * Instrument array_ref with a call to .ACCESS_WITH_SIZE for bound sanit= izer. * when the size is a negative integer, treat it as zero. * testing cases. 5. Add the 6th argument to .ACCESS_WITH_SIZE to carry the TYPE of the flexi= ble array. which includes: * Add the 6th argument to .ACCESS_WITH_SIZE. * use the type of the 6th argument of the routine in tree-object-size.cc * testing case. ******Remaining works: 6 Improve __bdos to use the counted_by info in whole-object size for the s= tructure with FAM. 7 Emit warnings when the user breaks the requirments for the new counted_b= y attribute compilation time: -Wcounted-by run time: -fsanitizer=3Dcounted-by * The initialization to the size field should be done before the first = reference to the FAM field. * the array has at least # of elements specified by the size field all = the time during the program. I have bootstrapped and regression tested on both x86 and aarch64, no issue. Let me know your comments. thanks. Qing --_000_AF1B4C3636D543968A777064515F9C4Doraclecom_--