From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 2BA29394880A for ; Wed, 10 Apr 2024 18:26:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BA29394880A Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2BA29394880A Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712773602; cv=pass; b=Ny6jT8OZOPGvY9kcm4lKc1AWozEKcsqS28UBMGT8U85QgAwIRhvzRUl+4KfTJbHCH/qmAWtFjxrr5vYOSiyjfriynUBmK4WDC/i4PVwCuNDuAC1Ugr3vLadTxi2PkWHEb9okOi9xnAG8lPpwlW05+T/+cEN554+3befYEQh/nf4= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712773602; c=relaxed/simple; bh=qDMCajABeRx9BdDTbyNFG4bHI9ljIBTY0M71EMCeKjI=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=lq2/tfmmK6IYSLZG1uwyQcgTTpH1y/JPTMTnmpF6DFwNtK+Z+NsfaQ/Hk0vcCdoYk8NbuXwSHnZHNTOnypC0jifTuA4Yo2sKaEHhlniZkINhQMWzsvcQbI69CWHWlz7JP1zSgI+WgzqeR6uzlf20CE/K5oP/DQScRfOiSo5/s4s= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ruceQ-0008Ou-Lc for gcc-patches@gcc.gnu.org; Wed, 10 Apr 2024 14:26:28 -0400 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 43AHx1Am011909 for ; Wed, 10 Apr 2024 18:25:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=ktY73cvtcCCjl27D591FOD5gqBrVU3X61slY/brrL6E=; b=oYxcf/fTS2jLfAVpPBM962Me3taMvPeKnHrkXCyCwj43ePMT/Qpq6BhH3ioPQgpgoUuV TKrbNzS4iLFmTT5IeFJqXFHJc9819M7D8+aD1bykM5r68TsTy7NBG3mEAozz6QFX8Uva pdTP1r3+OfJUzVqFfDK5ZorgYwHTPP66+DUkyelopaFN5vauXX2abAuvD2adXgwesbJI opC1mu25ns35uY/MhzBGA5wYr4UbW8UI5IaYGVzF6LBhPMgEJ5aYJBQF8WVC2Pisizfb 27X2YIA5Hhk/ig6En8Lx1aitZ2sDsVkrhSyO4s2jRZJSMAbyf2uXM1PPyERqiQ5PdBKQ jQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xavtf7yf3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 10 Apr 2024 18:25:25 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 43AHUrQG008024 for ; Wed, 10 Apr 2024 18:25:24 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3xavu8hwn4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 10 Apr 2024 18:25:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y8VJBemPrqLcoBo1sA8hHLs7ZC+c6MWA6UTFVjIIBJUBy1r8rSGpK2zLWcxB7yS6bTN+3ZcjGFri/Qzj78xuMAWCwPUjSAE1EXMsvubLA4YsLAtOPiPqsF3ieTjepf1sC/9Hutc35E3AwH2vnMENeCbprvc8ocmZS3CI9xZ8Ndc7A4vqAKTRQmx+cFimbPM8VrL9BpFlQ5som5k1TNpyzhlPypzCVX4OtCE5iTb01vBjso1pkC9kTujwPOjs9PfHxqB96sSuvFYd1npaIbdtuciR6xyPuuql2zyQYmW7ozf1wyuEDJkZ5M/bI/4l5O8ewPsu7+KCp9ad9S8ZSCjsmg== 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=ktY73cvtcCCjl27D591FOD5gqBrVU3X61slY/brrL6E=; b=UX3rtYr7HGXZsUYyOCwBuueEqM49SNPjEqnGNE5tF3X3Y90SZMGBAzLgJMI1qx73RIjzRtiWITslRS18k+L0H9Iq0uCwcFkQ0PhtPkd7939obHt1Ei0dHSlxD3fjHDr0QHZT0Qbtu7x6Dqn0WGkTUDeBCJRLkyUcDLx4+sBnKn5387dCXLELpACJUokP7JhnxJJUiBUiTPdiPp2GeRxn9q9pXythDxEQZ965mH0V6k7rWkXsgU5tRdflU9SzhqF/GE3QoeX/RzFxXBIYIxY0T3lgKLZ4jNbWZbvoQfmz9ZeKgrRXDqYy7/S0Swznep5owtWiXY5mHdUEfnTAVlh8lA== 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=ktY73cvtcCCjl27D591FOD5gqBrVU3X61slY/brrL6E=; b=TkgWjJqEvDGHgudQgeX2NQq0G5bzjBETdkUtK2gRpxr3v/r/z3/rxRTGHsXh8XLcst5NgOVSTPGG3TO4WqHGpYzu1jaYwr1vLquCErjyOEvybrApUpEifpsR8moj9b9J60bPo2CSbD1L/+BZ0p6lEmt7QUof7YMIdW7vlHPZ11U= Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by PH0PR10MB5548.namprd10.prod.outlook.com (2603:10b6:510:db::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Wed, 10 Apr 2024 18:25:22 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::6ae9:dd4d:17bc:4f2]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::6ae9:dd4d:17bc:4f2%7]) with mapi id 15.20.7409.053; Wed, 10 Apr 2024 18:25:22 +0000 From: Indu Bhagat To: gcc-patches@gcc.gnu.org Cc: david.faust@oracle.com, Indu Bhagat Subject: [PATCH 1/2] ctf: fix PR debug/112878 Date: Wed, 10 Apr 2024 11:25:10 -0700 Message-ID: <20240410182511.1528093-2-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240410182511.1528093-1-indu.bhagat@oracle.com> References: <20240410182511.1528093-1-indu.bhagat@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW4PR03CA0312.namprd03.prod.outlook.com (2603:10b6:303:dd::17) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2158:EE_|PH0PR10MB5548:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kzvNh4icBHxPGZGqAA+p3aspU3h6Hdt30rTm5LPzecgBxwiFv+lH6hVS4/ZcrDq+fOm+JrKDztTbWoG9EpjFP655lY9MwlcKFeRJPsXI64wdKGrA/GYfxRDLyGDHC/lKWMa3B4usNxSVfZJM3IO+H+XYlRyI06kG6kgLt+AZOlwozP39zvHPEmvaCwmiUB/DYM10Yt7Wlxbxb2BUfdqUqkNasmB3ymRiIngkpuH3fCNfI3C+tvEteq8EurKBrmyC0MtHyuzbbmznegM2rYGVlpaBNNIlAvYJEeBfD3e0xpRp/inm+RMSfAGHAkgQrqhPPIdk1Sz6boKl13X/hyX7oMAFpxRQPRyJx3lqaRpd8ooxZRX/jNkGY4ZUPUCTt7fxaIXvy7txG46vi54UFs0eKAKKH4aOA8h9pcD07jz75+yRlLb99AenHXMp7cOvwjGQ/AmMftGI0tLBBlS3eCyscSBJp1rWiNPTT0D53meyo6kAceRqdBBHGFDrFdcVLIRVj2AJBsEhCGCc1czaoO9pF53KqeNvZvj+8Q7ZqKgVTNdwGw2/6aU4ZbVYAq/++fbimL7nvaqcUdir2MgrXe0u0Og2x315i9VQaI+kGu9C0eU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2158.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?+SsPncILylskR9UrJpJPDrXIA/reD/KT4uwoGJX89QZWU0UjI68LVQThcJS/?= =?us-ascii?Q?YvEywQsb1Hf6tj5IjEA90BevjIGYQBUYeAK7Htf9keR3V4f0rD21c6Vdvgn/?= =?us-ascii?Q?fqbJl5+GGjtMKFq1UiWAMEv4rx+FDFiuOwW/sa/xZVLWOh91QlV4fnOcVoTM?= =?us-ascii?Q?Y2absEfzZ9qfxVZrhg/HtWnOnKEmMKmSLJf64WGHfiaB4a1Okt5mmnPpFwBS?= =?us-ascii?Q?D5yYCV+nNV8dyGrllniRTjUmSvqc0k6O4qbAVKB/ToaOQAIqBZcxF60klqKL?= =?us-ascii?Q?KirZ8IoRb01MLhHOtVnUl83QenF5K5OqbH+YxnJL68qCGn/TPDAjmwYUMRgW?= =?us-ascii?Q?pah1m29DjnagzM1t9G6YM1Fz+bPKc0g/nEmD31UsFRcw2polcaFAV6iXpBIP?= =?us-ascii?Q?peM0f31PGy6lL3hDUVyfy2VC0WAKTKVIHH+XB5U0IbywHTmzugZiaqwTKG3X?= =?us-ascii?Q?fCLo+6pGY/45S+WmhUdBjyyHwPAg+Z/kqZx2EM9X1FE9GnNZt/X1UhiUepXu?= =?us-ascii?Q?2JlBGy83HI089wAKg/W9yr552HsKpxfq+T8DTUcpG506KQQLg4avKmOx+qP4?= =?us-ascii?Q?gL6WqDChyqq6QruNh5x/gKS0eZiJ52lQya7xWZlKuDVlA3k8Z1xEudJ8H3WM?= =?us-ascii?Q?kf+ZlQBYItiVYfEl67Hc5CA7pTV17QRnM+ab/MB/yjvsEV3TLyRN9EA2irt5?= =?us-ascii?Q?vP7lF3W6EYuM5uYRQdnzx3/uxkRVGJo6HdyGq3/IwC3SIWO3c+5rJCNFMjXi?= =?us-ascii?Q?dCjh+3xsThezUymZnUg8QRRVlbV+tW3dQZqS1nmxHQwTbPejZKH+tbRVyPfU?= =?us-ascii?Q?hVis+2rzUx8Q4BmzKdMJ0lofbos1PhDV6gbVJn1LJJxm5SuchblW1c81sFrj?= =?us-ascii?Q?FrzwthjJdzpMrYVarWNPTqA41FPceO34/BpTrn01DHfQZ7PNMxClVzIn1Kv2?= =?us-ascii?Q?lZVxtS0ee4mARIUZfkDu7WYdZf+rosh5Oym8kJ321F8nK8wMRiwtU+C8cCw0?= =?us-ascii?Q?xEPWKIdYXzUb9RefmhExlDq+cTlL2KmWxoerIN/q1Ki/0Brn9DefO8xSYDyA?= =?us-ascii?Q?/hEdT7ShfozOJoTkkYsVPkGxf0xO/JBLUFwGon/b05QvZku+dpQA9ImdCIKx?= =?us-ascii?Q?lAjUkCMpojiXuDfx/mCbbGHmvMfRfxQ7QITtXz/A1sm31UNZNbukVTWq2W9x?= =?us-ascii?Q?sC4EPEaszckk8PULEJfxMA8UF7Uh++W609M1YIB/LVxJsD+KHe8tIsqdkusa?= =?us-ascii?Q?+ciDxpHdm+Vnw7KTY62BtA78sF1vMlvNQV67Rok6jbVgT3uZseij4Wh0lGYd?= =?us-ascii?Q?+fj+v3591KF+dYdO+jrrv9KUzyjLGK1m1n1RvFEqgQJbaRSmEvxFBJkhdMsV?= =?us-ascii?Q?ePLTcUsser36f8nV0hrJx9aioP81ubalfzfRl14RlO1lqMSLN6Uxga1VSkX+?= =?us-ascii?Q?xOjD3uX0N5zNDpEdJQhZ9cHHiilvlDHyHr8YxKbhxE8AYL6rL/KTInjkyp3k?= =?us-ascii?Q?BL5iV2x/vWMd6hJwYU4gMruL+o2Q40DEj4D+tOuMs6AgMRRlHlhtzOGiz3pI?= =?us-ascii?Q?GUWj6AgVQrk/0UWQUEXjXYsCcc98vWNsXGY1SLLAtQjYR8mDz/UMreykcXf7?= =?us-ascii?Q?b1RILdlRm3XceMAaAVih+OQ=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 9reqtgH5AsiJ83g9TcrZlMwSCw5vcdKawMhWLU7pQBVnOgi5jpvk++35mLyVredRtZA7KvUmw6324Mn02xSYSb03PDrJeQoVMqrHZEd9Ipex/voy2XD+Hw1AQnFJmF6JttUQyPZQqDXFPm6m9C/LmWC+hbKxkPyi07fDKGR2cKaGxsTiaZtM6kjhzAbKcLgVIAfLu0D3kCbxokawg7P3fS8iF/14hnhsgSIw9cwrSKtn5wL8fsmpoDMfxo01m8VPDcJASy2rjWCivjxJ8uKuupNm638s9I+gVXssq9eiIkf6t7DgCPXOMd/zVVuL3vuVliC1C4cy2ztrq8BCTBpaOCJCJXrJskEZmhQnVB97H8Qr3l/53DqG0qYKOBxE95/mJvebw8B9r8tiqfpf5tJrevyDsMcVz1lt+dG+qxkcVnaNfReoq50bIUED0PhDae04qlXQxWEz8xUi6Zpi6ZfS6E6xg+OA1P7MQWFyJ0oshSgh13N+hwU91CTKfuFzkXcCFDU8wVhiKmlUmlM+A5GhB+X0J2HNwELRRQ/mgO9olK+ZtlA+adDGAHWeUFGH+zo3cd6n+c5QQsIDdmP22oG79AvBvjjV/SN9RCkxMcqXQ3g= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4b3957d-45dc-43da-40b9-08dc598b953c X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2024 18:25:22.0354 (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: fep1FEamfQXmiNsTujGF319va985b18ZpxWoTQZwuAuxiM66Pw5ZclV7c+8zi4RxATvxbHRMwteh81aLGZ3Rfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5548 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-10_04,2024-04-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 mlxscore=0 adultscore=0 phishscore=0 bulkscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404100134 X-Proofpoint-GUID: nF6FhxIFpj9BcEndQK4s8GmmftrhqeVM X-Proofpoint-ORIG-GUID: nF6FhxIFpj9BcEndQK4s8GmmftrhqeVM Received-SPF: pass client-ip=205.220.177.32; envelope-from=indu.bhagat@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DKIM_VALID_EF=-0.1,RCVD_IN_DNSWL_LOW=-0.7,RCVD_IN_MSPIKE_H4=0.001,RCVD_IN_MSPIKE_WL=0.001,SPF_HELO_NONE=0.001,SPF_PASS=-0.001,WEIRD_PORT=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_NONE,TXREP,WEIRD_PORT 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: PR debug/112878: ICE: in ctf_add_slice, at ctfc.cc:499 with _BitInt > 255 in a struct and -gctf1 The CTF generation in GCC does not have a mechanism to roll-back an already added type. In this testcase presented in the PR, we hit a representation limit in CTF slices (for a member of a struct) and ICE, after the type for struct (CTF_K_STRUCT) has already been added to the container. To exit gracefully instead, we now check for both the offset and size of the bitfield to be explicitly <= 255. If the check fails, we emit the member with type CTF_K_UNKNOWN. Note that, the value 255 stems from the existing binutils libctf checks which were motivated to guard against malformed inputs. Although it is not accurate to say that this is a CTF representation limit, mark the code with TBD_CTF_REPRESENTATION_LIMIT for now so that this can be taken care of with the next format version bump, when libctf's checks for the slice data can be lifted as well. gcc/ChangeLog: PR debug/112878 * dwarf2ctf.cc (gen_ctf_sou_type): Check for conditions before call to ctf_add_slice. Use CTF_K_UNKNOWN type if fail. gcc/testsuite/ChangeLog: PR debug/112878 * gcc.dg/debug/ctf/ctf-bitfields-5.c: New test. --- gcc/dwarf2ctf.cc | 15 ++++++++++----- .../gcc.dg/debug/ctf/ctf-bitfields-5.c | 17 +++++++++++++++++ 2 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-bitfields-5.c diff --git a/gcc/dwarf2ctf.cc b/gcc/dwarf2ctf.cc index 77d6bf89689..dc59569fe56 100644 --- a/gcc/dwarf2ctf.cc +++ b/gcc/dwarf2ctf.cc @@ -606,11 +606,16 @@ gen_ctf_sou_type (ctf_container_ref ctfc, dw_die_ref sou, uint32_t kind) if (attr) bitpos += AT_unsigned (attr); - field_type_id = ctf_add_slice (ctfc, CTF_ADD_NONROOT, - field_type_id, - bitpos - field_location, - bitsize, - c); + /* This is not precisely a TBD_CTF_REPRESENTATION_LIMIT, but + surely something to look at for the next format version bump + for CTF. */ + if (bitsize <= 255 && (bitpos - field_location) <= 255) + field_type_id = ctf_add_slice (ctfc, CTF_ADD_NONROOT, + field_type_id, + bitpos - field_location, + bitsize, c); + else + field_type_id = gen_ctf_unknown_type (ctfc); } /* Add the field type to the struct or union type. */ diff --git a/gcc/testsuite/gcc.dg/debug/ctf/ctf-bitfields-5.c b/gcc/testsuite/gcc.dg/debug/ctf/ctf-bitfields-5.c new file mode 100644 index 00000000000..fee8228647c --- /dev/null +++ b/gcc/testsuite/gcc.dg/debug/ctf/ctf-bitfields-5.c @@ -0,0 +1,17 @@ +/* Bitfield where the bit offset is > 255 is not allowed in CTF. + + PR debug/112878. + This testcase is to ensure graceful handling. No slices are expected. */ + +/* { dg-do compile { target bitint } } */ +/* { dg-options "-O0 -gctf -dA" } */ + +/* No slices are expected, but a struct with one member is expected. + CTF_K_UNKNOWN is also expected. */ +/* { dg-final { scan-assembler-times "cts_type" 0 } } */ +/* { dg-final { scan-assembler-times "\[\t \]0x1a000001\[\t \]+\[^\n\]*ctt_info" 1 } } */ +/* { dg-final { scan-assembler-times "ascii \"unknown.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */ + +struct { + _BitInt(282) a : 280; +} b; -- 2.43.0