From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR06-VI1-obe.outbound.protection.outlook.com (mail-vi1eur06olkn2052.outbound.protection.outlook.com [40.92.17.52]) by sourceware.org (Postfix) with ESMTPS id B2203397B807 for ; Mon, 26 Jul 2021 16:45:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B2203397B807 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=hotmail.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hotmail.de ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BLjvYPNLd2Kajqh7o45XkOPmNPn1JNkm7lA555Ulo+6W7vRsINwy7Fho7Iea1URTibVfH704s+6Y2VeCNyBtMQCqlD+zaouFtbQbGiLilE2UYmU9/tITf+xWaNwJ4W+x8m6LoEZan8bUxJXr5HaNLKx8wGN+FPZuCjKW0MIwYcGnMIv1iWEkgDt0CfphTVQ/5lwImTaNZsky/1jFLoxZmqnevTeN9lRy4iQqsMGOJwYcj1LftieJ455F5+2I5Qk11tYPpV8B7kcbGfKt089axkX16CmIQbQksmGp61Kjb9/j6tvSh0NEfK3krFJGpvMImZpCviuJfKqL9vHmGxYCgw== 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-SenderADCheck; bh=mEljhld3DDL0vQcfksWzmTNG5r407kPE/RJE7cYUjNM=; b=NO40GfrFkhwMLzaF2LuLnWr4ZrsFWBpfIoiPu4j2O+gS4ERqTfG4y+7r5qbkUnf3+2L3q4TUaVtKjFLaZV5ppzPKRgMADDPacNPys/P+SvUwF142jzlMDcu15dlK7D+zFaaFhQP0mhZwocHzM7CsDn8CYRqLzwXsuHna3GFA0Uy8WU9julhl51ru99U/5ZMDXu421XrXObMg4wo5NIgJIcK+NWvHWUUP8xq0Tz3jyAhp2c46pymFumz4bQW4LjnycIiyd7b0wvWMG/D7XST1qLaZ83xIwn4bjBHRiSjRa3hirmwwhCq+9yohTWo3h3dn+Wgzws26WrSzp1KEDttGeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DB8EUR06FT028.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::4d) by DB8EUR06HT020.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::433) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.24; Mon, 26 Jul 2021 16:45:31 +0000 Received: from AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM (2a01:111:e400:fc35::40) by DB8EUR06FT028.mail.protection.outlook.com (2a01:111:e400:fc35::253) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.24 via Frontend Transport; Mon, 26 Jul 2021 16:45:31 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:1459FFC64205438D6D7810808BDA2C400A5F6D0722C7F24A7221BF0C03F5891A; UpperCasedChecksum:7415C14E654A7E141CB124F4A1C0F986B9E9E8791386B3BF12CA3D232CA6F31A; SizeAsReceived:7778; Count:45 Received: from AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM ([fe80::3d30:d151:570a:8a16]) by AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM ([fe80::3d30:d151:570a:8a16%8]) with mapi id 15.20.4352.031; Mon, 26 Jul 2021 16:45:31 +0000 To: "gcc-patches@gcc.gnu.org" , Richard Biener , Eric Botcazou , Arnaud Charlet From: Bernd Edlinger Subject: [PATCH 0/2] Fix bogus line info in DECL_IGNORED_P functions Message-ID: Date: Mon, 26 Jul 2021 18:45:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TMN: [XI2+LIuL5vJJVJRUrSN+lBAZosCNxPPS] X-ClientProxiedBy: AM0PR02CA0019.eurprd02.prod.outlook.com (2603:10a6:208:3e::32) To AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:364::23) X-Microsoft-Original-Message-ID: <30651532-982f-f25a-c06a-6e08c1a3f51b@hotmail.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (88.76.118.196) by AM0PR02CA0019.eurprd02.prod.outlook.com (2603:10a6:208:3e::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.25 via Frontend Transport; Mon, 26 Jul 2021 16:45:30 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 45 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: dca0a34a-ed3d-42b1-0194-08d95054c7c1 X-MS-TrafficTypeDiagnostic: DB8EUR06HT020: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KLr5elQz1SEYkqDQueiGvEpOOjZVDYVRtiL/GJFLOlZHMGyRlPTudB+EGcYrinbBGFzlsDCbrulc28+hrFAP/DG7PSJqtSfUV8J3Q/1SZuOoSD/Dnu3d3WuwEpQZuCPMAoNhL/ipvId0YwdBdTTupFFYvYt+nki4s47L3SFqh1W7SdpNsY8Eny6/oCOHVYAGk7d2kwrAogqkpjiVexEmCPBrhVOr7E41oxDJDv7CmhdRaLoxkLiv+JLXu/W/dh77Vy0ELItDWeTQ+TGq/XwblmnuDe6zkdkR8I0jyqsWj8LZBATfYNAG2oU9qYZ5fW+5P1+fr5i5YOwkVPkFOl4qb9x1d8/xFWTobhzvcIiRWH9Jg6nUdWVxkefXFR/OQIHdML7geGYA21krfqaw3/Qxi88VAzgXgFqD1JXCsX0aAOZoESDeatOoPejj6pPqtqEMdJffBaX3pf2mi72daWj8Dn6SSF0zi75SC9A2o2j/49Y= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jfM3Fj/7r5BthS5AWIWxBJef7y5EI2Cj8vGe1MbYJ2WZWPNpHKfUG/e52DhTYgCd/pWBxLYWWiqLRDbNJ+q/8JBi/v7zKuna9ZPcG8Yzbi11DC2PxRWLc3kySTWj2t8OSUzS+AqaE+FOZUKxu1wK+A== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dca0a34a-ed3d-42b1-0194-08d95054c7c1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2021 16:45:31.4638 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB8EUR06FT028.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8EUR06HT020 X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00, FORGED_MUA_MOZILLA, FREEMAIL_FROM, KAM_DMARC_STATUS, KAM_SHORT, MSGID_FROM_MTA_HEADER, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Mon, 26 Jul 2021 16:45:36 -0000 This fixes a regression which was introduced accidentally with commit e69ac020372 ("Add line debug info for virtual thunks"). That is certain Ada functions have now a .loc directive which is probably not how the debug experience of those functions was intended. Currently those functions stop in the debugger when stepped into, and show the source location where the data type was declared. It was pointed out in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101575#c7 that the previous behaviour is what Ada really wants here. The prevoious debug experience can be achieved by setting DECL_SOURCE_LOCATION of such functions in the Ada front end to UNKNOWN_LOCATION. This is done by (2/2). However it turns out that the test case which is from the gdb-test suite has a special feature that the ignored function is compiled before the first normal function, and that triggers a misbehaviour of the dwarf-4 assembler. That shows a corner case where the current handling of ignored functions with no line info at all fails to suppress the bogus line numbers. That is fixed by (1/2), by emiting a dummy .file directive when there was no preceeding .file directive. This was boot-strapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks, Bernd Edlinger (2): Fix debug info for ignored decls at start of assembly Ada: Remove debug line number for DECL_IGNORED_P functions gcc/ada/gcc-interface/trans.c | 4 +++- gcc/dwarf2out.c | 29 +++++++++++++++++++++++++---- gcc/final.c | 5 ++--- 3 files changed, 30 insertions(+), 8 deletions(-) -- 1.9.1