From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2045.outbound.protection.outlook.com [40.92.91.45]) by sourceware.org (Postfix) with ESMTPS id 4C7EC3857C67 for ; Tue, 5 Jan 2021 06:44:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4C7EC3857C67 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=hotmail.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bernd.edlinger@hotmail.de ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A6A6SI2wOuDyMMSPZs5vSBTF/DC8R22aK1+xXqzKH3ppWIFse0JYDXcsNWIXbSE9Ns7ZN8sJfHc5LAePpKr8YoIvLG3XmJ2z+/OCpu2mrEsxORh4TVALHCUcLWu6i+S/6Z+4TirbUTRjnXAX6aRsvb7nNU3xFLxyi6/dPeB1pWDvVwTpAMzUQNiLWLkvxphm96Oh+1izzqaNa9/NIYNfcM4SKqrsl5XLGZHoLfD07hBjUxbDNXMIGnKr8IofBhdXcuTRPL5VNgrNbDPZEdfaWEhyiCtSWWAaE5A7BFAATbb/WsncbX1/7KwGpZsZcS5RVvZ2CLzOsl7F4CEKlNPIlA== 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=T/ND0CsfVJHjRPaQ8C27SyIrQc2cQbzDWybDWH+zqr0=; b=CK24dLczdhyPowp7EtpEvsK9+fsxUJNsl4Tkc8osvYYDUsgzmC4nR6FVZntULREOjIwNJrt1rFkZ/XN+TD5rbNQMcBg46LR2KvBYcUhcsaOxMiQ8+wnnb7dIIF4Mbcvs2l40aCL5EqlojAqEmSEq4LcMlIBZlKxvyMPT3aVHNhl957yuM5VnZvDGQk2e3G6crd5UvnQrCRe5XkC88y1VHT2PM4m3ZiUC114CEzB67HTDLxa+vNJ4qYUYzOhAU5J6ZH3QUhf85FGc7+rHCFzquB3BATzUixgeoU3BCsp8NVX4Ui3aD1XT6VyIV0NtnpRBrydr2oGjYVfue1pbFpN6lg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DB8EUR05FT065.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::53) by DB8EUR05HT044.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::312) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.20; Tue, 5 Jan 2021 06:44:44 +0000 Received: from AM0PR0602MB3410.eurprd06.prod.outlook.com (2a01:111:e400:fc0f::53) by DB8EUR05FT065.mail.protection.outlook.com (2a01:111:e400:fc0f::306) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.20 via Frontend Transport; Tue, 5 Jan 2021 06:44:44 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:CAEA5BFF4283EBEAC66CB89BCBA82FAF716F391938CE7DF03D5474858123CD74; UpperCasedChecksum:BFF7408F091F9AABC48EEAFD95B603488C153AE9BF8E37757F7FC690F7B9B776; SizeAsReceived:7963; Count:47 Received: from AM0PR0602MB3410.eurprd06.prod.outlook.com ([fe80::60c8:86c2:bdaa:f0d2]) by AM0PR0602MB3410.eurprd06.prod.outlook.com ([fe80::60c8:86c2:bdaa:f0d2%3]) with mapi id 15.20.3721.024; Tue, 5 Jan 2021 06:44:44 +0000 Subject: Re: [PATCH] Restore input_location after recursive expand_call_inline To: Jeff Law , "gcc-patches@gcc.gnu.org" , Richard Biener References: <1d7f3f93-17c9-af16-504e-f32496c7107f@redhat.com> From: Bernd Edlinger Message-ID: Date: Tue, 5 Jan 2021 07:44:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 In-Reply-To: <1d7f3f93-17c9-af16-504e-f32496c7107f@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TMN: [jwwUtGhqVlB/nnIAEY7xge529PBZu7bj] X-ClientProxiedBy: AM0PR10CA0098.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::15) To AM0PR0602MB3410.eurprd06.prod.outlook.com (2603:10a6:208:21::24) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (88.68.3.2) by AM0PR10CA0098.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6 via Frontend Transport; Tue, 5 Jan 2021 06:44:43 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: e0ec5340-f6b0-4711-376a-08d8b14562e9 X-MS-TrafficTypeDiagnostic: DB8EUR05HT044: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cZnY+fqU8VPP5sBglvfyUw/NhjIFHiRDhINJXGWDfIpu9A2+6a/hyUMHVcKJR4NFPOZsF4/CU4IoCYJT2MM6DukfaSAbJcsHGwN1AtbRbbmptvS0mX22Gv7xPp41WZ8qzIl1+l5sZKiDapbQdlaHhwPf94YlH8qB0bdE+2w+STrqI97upBrkX7E+J7X9j0atg3Dw5YBXEg+79971nLSq5lRR++91jvyCxeLnG7LobFUn55UsgggYeGE2gAVwTcih X-MS-Exchange-AntiSpam-MessageData: S4tbG+30IhIz4KJCsdDpKT+lvNvJZ/tnidGOLpVHOR6ZHDYLDJ0EK5suk/NH4URiXksqUHIYOR9mDgx7hANO2TmOnRO+xHtYYNmC3o9EpB5WOaF+IL09e+b4BOALX87kkG8Fqn7XNMleLC8D4oW0UA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2021 06:44:44.2706 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-Network-Message-Id: e0ec5340-f6b0-4711-376a-08d8b14562e9 X-MS-Exchange-CrossTenant-AuthSource: DB8EUR05FT065.eop-eur05.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: DB8EUR05HT044 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, FORGED_MUA_MOZILLA, FREEMAIL_FROM, KAM_DMARC_STATUS, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Tue, 05 Jan 2021 06:44:48 -0000 On 1/4/21 10:23 PM, Jeff Law wrote: > > > On 1/4/21 1:12 PM, Bernd Edlinger wrote: >> Hi, >> >> I spotted a place where input_location is clobbered accidentally. >> >> That is in a recursive call to expand_call_inline. The input_location >> is usually restored by goto egress in this function. >> >> Additionally the return value of the recursive expand call is thrown >> away, which does not look like a good idea. >> >> Although this causes no problems ATM, I wanted to fix it anyway. >> >> >> Bootstrapped and reg-tested on x86_64-pc-linux-gnu. >> Is it OK for trunk? >> >> >> Thanks >> Bernd. >> >> 0001-Restore-input_location-after-recursive-expand_call_i.patch >> >> From 88b963bba7b32972abf0ea44a01c03d643d7c6ca Mon Sep 17 00:00:00 2001 >> From: Bernd Edlinger >> Date: Mon, 4 Jan 2021 11:35:31 +0100 >> Subject: [PATCH] Restore input_location after recursive expand_call_inline >> >> This is just a precautionary fix. >> >> 2021-01-04 Bernd Edlinger >> >> * tree-inline.c (expand_call_inline): Restore input_location. >> Return result from recursive call. > I suspect that we're always supposed to inline in this case.  As > asserting that successfully_inlined is true before jumping to "egress" > seems wise. > > OK with that change after the usual testing. > No this does not work: +FAIL: g++.dg/ipa/devirt-5.C -std=gnu++98 (internal compiler error) +FAIL: g++.dg/ipa/devirt-5.C -std=gnu++98 (test for excess errors) +UNRESOLVED: g++.dg/ipa/devirt-5.C -std=gnu++98 compilation failed to produce executable +FAIL: g++.dg/ipa/devirt-5.C -std=gnu++14 (internal compiler error) +FAIL: g++.dg/ipa/devirt-5.C -std=gnu++14 (test for excess errors) +UNRESOLVED: g++.dg/ipa/devirt-5.C -std=gnu++14 compilation failed to produce executable +FAIL: g++.dg/ipa/devirt-5.C -std=gnu++17 (internal compiler error) +FAIL: g++.dg/ipa/devirt-5.C -std=gnu++17 (test for excess errors) +UNRESOLVED: g++.dg/ipa/devirt-5.C -std=gnu++17 compilation failed to produce executable +FAIL: g++.dg/ipa/devirt-5.C -std=gnu++2a (internal compiler error) +FAIL: g++.dg/ipa/devirt-5.C -std=gnu++2a (test for excess errors) +UNRESOLVED: g++.dg/ipa/devirt-5.C -std=gnu++2a compilation failed to produce executable +FAIL: g++.dg/ipa/devirt-c-4.C -std=gnu++98 (internal compiler error) +FAIL: g++.dg/ipa/devirt-c-4.C -std=gnu++98 (test for excess errors) +UNRESOLVED: g++.dg/ipa/devirt-c-4.C -std=gnu++98 compilation failed to produce executable +FAIL: g++.dg/ipa/devirt-c-4.C -std=gnu++14 (internal compiler error) +FAIL: g++.dg/ipa/devirt-c-4.C -std=gnu++14 (test for excess errors) +UNRESOLVED: g++.dg/ipa/devirt-c-4.C -std=gnu++14 compilation failed to produce executable +FAIL: g++.dg/ipa/devirt-c-4.C -std=gnu++17 (internal compiler error) +FAIL: g++.dg/ipa/devirt-c-4.C -std=gnu++17 (test for excess errors) +UNRESOLVED: g++.dg/ipa/devirt-c-4.C -std=gnu++17 compilation failed to produce executable +FAIL: g++.dg/ipa/devirt-c-4.C -std=gnu++2a (internal compiler error) +FAIL: g++.dg/ipa/devirt-c-4.C -std=gnu++2a (test for excess errors) +UNRESOLVED: g++.dg/ipa/devirt-c-4.C -std=gnu++2a compilation failed to produce executable +FAIL: g++.dg/ipa/imm-devirt-2.C -std=gnu++98 (internal compiler error) +FAIL: g++.dg/ipa/imm-devirt-2.C -std=gnu++98 (test for excess errors) +UNRESOLVED: g++.dg/ipa/imm-devirt-2.C -std=gnu++98 compilation failed to produce executable +FAIL: g++.dg/ipa/imm-devirt-2.C -std=gnu++14 (internal compiler error) +FAIL: g++.dg/ipa/imm-devirt-2.C -std=gnu++14 (test for excess errors) +UNRESOLVED: g++.dg/ipa/imm-devirt-2.C -std=gnu++14 compilation failed to produce executable +FAIL: g++.dg/ipa/imm-devirt-2.C -std=gnu++17 (internal compiler error) +FAIL: g++.dg/ipa/imm-devirt-2.C -std=gnu++17 (test for excess errors) +UNRESOLVED: g++.dg/ipa/imm-devirt-2.C -std=gnu++17 compilation failed to produce executable +FAIL: g++.dg/ipa/imm-devirt-2.C -std=gnu++2a (internal compiler error) +FAIL: g++.dg/ipa/imm-devirt-2.C -std=gnu++2a (test for excess errors) +UNRESOLVED: g++.dg/ipa/imm-devirt-2.C -std=gnu++2a compilation failed to produce executable +FAIL: g++.dg/ipa/pr71146.C -std=gnu++98 (internal compiler error) +FAIL: g++.dg/ipa/pr71146.C -std=gnu++98 (test for excess errors) +FAIL: g++.dg/ipa/pr71146.C -std=gnu++14 (internal compiler error) +FAIL: g++.dg/ipa/pr71146.C -std=gnu++14 (test for excess errors) +FAIL: g++.dg/ipa/pr71146.C -std=gnu++17 (internal compiler error) +FAIL: g++.dg/ipa/pr71146.C -std=gnu++17 (test for excess errors) +FAIL: g++.dg/ipa/pr71146.C -std=gnu++2a (internal compiler error) +FAIL: g++.dg/ipa/pr71146.C -std=gnu++2a (test for excess errors) +FAIL: g++.dg/ipa/pr79776.C -std=gnu++98 (internal compiler error) +FAIL: g++.dg/ipa/pr79776.C -std=gnu++98 (test for excess errors) +FAIL: g++.dg/ipa/pr79776.C -std=gnu++14 (internal compiler error) +FAIL: g++.dg/ipa/pr79776.C -std=gnu++14 (test for excess errors) +FAIL: g++.dg/ipa/pr79776.C -std=gnu++17 (internal compiler error) +FAIL: g++.dg/ipa/pr79776.C -std=gnu++17 (test for excess errors) +FAIL: g++.dg/ipa/pr79776.C -std=gnu++2a (internal compiler error) +FAIL: g++.dg/ipa/pr79776.C -std=gnu++2a (test for excess errors) +FAIL: g++.dg/ipa/pr85421.C (internal compiler error) +FAIL: g++.dg/ipa/pr85421.C (test for excess errors) +FAIL: g++.dg/ipa/pr91969.C -std=gnu++98 (internal compiler error) +FAIL: g++.dg/ipa/pr91969.C -std=gnu++98 (test for excess errors) +FAIL: g++.dg/ipa/pr91969.C -std=gnu++14 (internal compiler error) +FAIL: g++.dg/ipa/pr91969.C -std=gnu++14 (test for excess errors) +FAIL: g++.dg/ipa/pr91969.C -std=gnu++17 (internal compiler error) +FAIL: g++.dg/ipa/pr91969.C -std=gnu++17 (test for excess errors) +FAIL: g++.dg/ipa/pr91969.C -std=gnu++2a (internal compiler error) +FAIL: g++.dg/ipa/pr91969.C -std=gnu++2a (test for excess errors) +FAIL: g++.dg/ipa/pr92454.C -std=gnu++98 (internal compiler error) +FAIL: g++.dg/ipa/pr92454.C -std=gnu++98 (test for excess errors) +FAIL: g++.dg/ipa/pr92454.C -std=gnu++14 (internal compiler error) +FAIL: g++.dg/ipa/pr92454.C -std=gnu++14 (test for excess errors) +FAIL: g++.dg/ipa/pr92454.C -std=gnu++17 (internal compiler error) +FAIL: g++.dg/ipa/pr92454.C -std=gnu++17 (test for excess errors) +FAIL: g++.dg/ipa/pr92454.C -std=gnu++2a (internal compiler error) +FAIL: g++.dg/ipa/pr92454.C -std=gnu++2a (test for excess errors) FAIL: g++.dg/guality/pr55665.C -O2 -flto -fno-use-linker-plugin -flto-partition=none line 23 p == 40 +FAIL: g++.dg/lto/devirt-5 cp_lto_devirt-5_0.o-cp_lto_devirt-5_0.o link, -O3 -fno-early-inlining -fno-inline -fdump-ipa-cp -fdump-tree-optimized -flto (internal compiler error) Is it OK in the original form? Thanks Bernd. > Jeff >