Message ID | CY5PR21MB354293045D32BFB1659CB2D691239@CY5PR21MB3542.namprd21.prod.outlook.com |
---|---|
State | Committed |
Commit | 80f414e6d73f9f1683f93d83ce63a6a482e54bee |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 718153953814 for <patchwork@sourceware.org>; Tue, 11 Oct 2022 00:37:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 718153953814 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665448655; bh=DmTCEoi/sYyTiAvvIMm6+tdaJYmrlkDilKq4llDHA2E=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=iCGK/+xJTSz/K1ihsJqcrYVoGBv0oo6P7HukYqQatSEsLS8SA8k08fXw/rp1X078R vEHoeSNCk0DBulTDy/880/jQpJGjQVIyMGRm65Roo7eQNXhETDqDJLj2HHx6RaFR51 5RGOJVbOYivtFaE1Fm692DuhUYviRgJxATMAAzvw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from na01-obe.outbound.protection.outlook.com (mail-centralusazon11023014.outbound.protection.outlook.com [52.101.64.14]) by sourceware.org (Postfix) with ESMTPS id B232D3858437 for <gcc-patches@gcc.gnu.org>; Tue, 11 Oct 2022 00:37:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B232D3858437 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I0bBXRysS9OYbyeVXesXvivkK2TwUs5L/nZtaIB8eERtdSW3rmIkAFfHAQiv6KLBHwYs56aOyrzwfnPqGWBKNaTXT1S4DgDZIVqUhrQ3hdint/XyrOLBMoDyxzLFk0oGJT+e7D2dJi8mRHZ4/0vBrN/bQrC/Eet0/VdOwiTYiPuMK4WBYOXqcD1khYyXjrbwtD6Nzk8LyegGYQjRMpvIuFjvG977KFYTVnZ4XEAyV5rKmxdt9citeuHQPuUojh/F/sOSQ6XXjTiljOIfUmIej7bMDI2HsERQEbiig9PruozLoxbT1Ucv0fJiAETTChDR1QbKbKi9nSPq7fOKaiX39w== 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=DmTCEoi/sYyTiAvvIMm6+tdaJYmrlkDilKq4llDHA2E=; b=Rkh0oU7e/M/s06hHlaXV7ml2qyTV8RmJHpqF772Wcks1f3hmgiFmmTd61STrZFbJNxvurbjr7E7F6qP1/Lc81y9iEUqm0RzmhGpo+VLBDixZ8NXtyvaprL+UVEUw4ectZwm+VQtjcLMaz/8MbANQD6JI2pXYEaoC1FTlu9AG45870SpIR8Pg6vCuYaMz8xlUAJnABZRQAUNhgXPGRz/O+CeM6dL+ir0YJeg3m0AnKGYu0/OLNBymxW6ELmEM3x2PCuEd4+YfeaJNo0UOn/V0p+z9rorKJ+vrsQSzsg1Swisg8NDk/HYX54/rT9oCDllTWIxkP1ok6qYaLLTnT6L+tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none Received: from CY5PR21MB3542.namprd21.prod.outlook.com (2603:10b6:930:d::7) by IA1PR21MB3546.namprd21.prod.outlook.com (2603:10b6:208:3e1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.8; Tue, 11 Oct 2022 00:37:00 +0000 Received: from CY5PR21MB3542.namprd21.prod.outlook.com ([fe80::38ea:b9c1:41a7:b0ec]) by CY5PR21MB3542.namprd21.prod.outlook.com ([fe80::38ea:b9c1:41a7:b0ec%3]) with mapi id 15.20.5709.020; Tue, 11 Oct 2022 00:36:59 +0000 To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>, Jason Merrill <jason@redhat.com>, "hjl.tools@gmail.com" <hjl.tools@gmail.com> Subject: [PATCH][ICE] Fix for PR107193. Thread-Topic: [PATCH][ICE] Fix for PR107193. Thread-Index: AdjdAlXQCtx9hdLARzGl52+qPvII4g== Date: Tue, 11 Oct 2022 00:36:59 +0000 Message-ID: <CY5PR21MB354293045D32BFB1659CB2D691239@CY5PR21MB3542.namprd21.prod.outlook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=1824d113-ec74-407c-a06b-4966a6dbb33f; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-10-10T23:38:39Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CY5PR21MB3542:EE_|IA1PR21MB3546:EE_ x-ms-office365-filtering-correlation-id: 7052f4f8-728d-4185-dec3-08daab20b566 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EwtQYTZGlkQZL+jivfLBr0RSSXBkj2P87DvfQfsdkL+9B6kn9vC8dTqyd0M+mHR/8igBYQXNw3I2M6sKNvH3pnMCE6FzEVePRx88Iy5rCmBjguIG1h+uWzjoYc2KUFkn2kpaqwhZk5cFaiEVrN4yR8qz6WeD2pBZ0DaXm1dGjjIY6i/KTBLnEnVf0309GuzBVtyE5JqdQOKxkYARf0DBpfCy3qWCvqVxcQY7CBKXbvM3TeAvTsNmYIYzacAsPru9xAqbKlRdZZk1USE39x21tens3bEjw5xmF+7qtgPitPsFokV++WUo1w8YoK83GRStHSpWnwr9rmLBuWSL1RV1sOkkE33yk23ZhbfJ7SExXI9Bh7eFwfRkoLkUIWcEL2BFQ4mCxsOptzBl6QV2R0KungR6A9soQnbpYNeTJ0hdPVeApFLvfN6XAfIPFw0HBto0Aw0Xaeg6KIhN0iNelkfzq/e+LoNLrV3lMUuxQM4hHfOv+fL4kHgjwOxH6k3s0iUfuFVI6/VJoRPG14stp/AlZF4dS0Wc9iEeU+I+6NSas64qLJwHugrtlguaMcDKdtXbK4KFP26osmigkESaw3BChSCqdrsPs9ggdRU/CMAQZPG0skLT1Tuy3cuXixk/RV25H8asLatCh4Fiai3oaHAFeiENqPg1T2J00a+VKTOcZsJ6EUDxaM6lU/TuQFxXBC2UlcEFJopLfWiHM33qwCW51Exi83MOYXqNTXtVycXR9xdRdsKp2R6YZtNkMvmljt+QAo9hL02JZYCu9bMr2h41nhQ5z4svkQBc5zglNOHEGhcLx3u9GMIn+ldLU/Q4oxLG x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY5PR21MB3542.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(376002)(366004)(346002)(396003)(136003)(39860400002)(451199015)(2906002)(55016003)(110136005)(316002)(7696005)(33656002)(8936002)(478600001)(66476007)(186003)(66556008)(41300700001)(66946007)(5660300002)(52536014)(6506007)(8676002)(86362001)(9686003)(66446008)(76116006)(64756008)(83380400001)(8990500004)(38100700002)(122000001)(82960400001)(82950400001)(71200400001)(10290500003)(38070700005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: g7/+hqE8mtOXzyJiddHm7ZfeW72azTo7U7oYX0Suugysr/8Sd1727QBpY320Jl26ff10RGPtwnFvHL19Fsf4pXTG30uMR4z0khnbXpRe8n+1MWDHH/5ylS+FkmLcJREeMoPL2wv41OfgVctVNa4zNbByD1DbR9QuI/iZKwdVNNzgN9TgMlK0wA8emLGDdSSmwtGgDd8n8BLjpdiC95X5lkZ1pSFqAdMa7jWfROJTtyL7+CKqUMYEMHglJKxcZ3Bhu9WcgGfOyb9lkQdUgraDNkwDAqgbAbvjsCzzd1KmER4fc5YTZGns4OQcvtR7mbL9EN7vm4U4V/fjSg6qVP3XYOqsh2h4+eItuOY7TL9TBRi9+zEdRn4kuBzscYW6D3i8vGH050i7K+9FOfIGEvKSafUOtNYJNFmIqzy9Jt5e4g4h/jrOVJuVsSuBq7SVjlPuiaewsSlOZwtU6UbQVi8zicG5z/YwG4q2UOp9as522uBmtmlTRnKDQqAzRh8lQGTxvziMYnkRq54xilCPKVP9Onn28FsqksQWFW7AFWdMDm7RR+nGeyC02Z/RYSWyRPdY77gYY7xScQ6zwOkCnKBg8RJq6mG60QThgkYTlW1z48fon4onPfaE+KagcKWEgPrKUmXueSa0nooSHRE0nppCEVJJ6g353pKSfODYV5E47m79XEwdx5HB+kL6La59MoYAKIKrTotD6SrUTMj92fcTxAPzAM9f3Vi1T6UhD/5FNLkEPPDfc6x+cYDLzB+lDFeuacauLDVyKxQB1QYjqm3sufX/hCkxbp1RrGqjoV5FHcB63UjmeFwpDb4UIR2TA9s4bJSHP72AjTNaTzHxMNZAm8rhRqwHNrNg3kAmuZTs8/mdp6wU+XgabXsr4VrQIXjBjQUU3vKGNVCDlGkyqiYHaLTmat80FclyJecFfZZ7PNvZGfoZmFrzSS4tRVV7ZkREgjTasTXrtsR7GA/TQ1fSa672DsafNcrQQuPCoovNc6oSnjC3ypyq6WnhtzP5zFCTnV/UnmPSvJSDAZYSoRqWV/NkBv50Ob7Yc9Qv5wfn8/2tKo1bCoJNzcw3aIzmwMZSoN6Q9f8mR25sWXpjpFEMn6AzfG70vi308aaCh7lGE/KR3JWPZGVvQy1L6vWq0pi4WE3FCgXJhYFPhFN8HbCgYfiMECULeFawcQJi8Bioo9vHGSEBbye4ne3JQNOGS7SlSu5v2rCQEXIu1c7V99ni9UgMKpdDTkfjS5eknFCInM0terhuPyWLCFWxcbTRummIUAAWHMPRsr8uA367+VFGavmYIDn1Mxawr9kp+7RWTMWLz07+lOEr4k/0oTqHWbk/6W5gJ7wZsdd0EW+en6D+NwhjsV8eGVE+Jbp5P4IBfn15qG/3pyf/Dlx+jOB/G08DoRGgQpWiqtjwZLmZ8yUKp65yERlS3JTimw8m4yNey3unWeXWFnzqSMAzlkFHjmuiR7SuNdq6hJyclVeLZs+OKnFaIAHRKZR0deTj1kmVzWQV2hHWvauoGQhDTlsc1tpMqZHCd3IEF+2IDwcLYJ0h8CvI4N4+JKpT6hufn6mbOWcEz9yUoswd0b8OqXY7gQCZj0q5DkKp1zgUAZc8Tj/K5H4QFGwwTdwkN5yT75U37h4WDxplCDQuzjHk+qbS6mAv Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY5PR21MB3542.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7052f4f8-728d-4185-dec3-08daab20b566 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2022 00:36:59.6751 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: F9AU7B6pyTK3ZwuQL8Bycn0VOtXMYevA11M/BPuaakObrOH5MyuAHyqGcid5DNKPPlqM0I7idw53ycmnWwlGtA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR21MB3546 X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Eugene Rozenfeld via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Eugene Rozenfeld <Eugene.Rozenfeld@microsoft.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
[ICE] Fix for PR107193.
|
|
Commit Message
Eugene Rozenfeld
Oct. 11, 2022, 12:36 a.m. UTC
The bug was introduced in f30e9fd33e56a5a721346ea6140722e1b193db42. A variable (cur_locus_e) was incorrectly declared inside a loop. I also moved two other declarations (last and locus) down to make the code more clear. Tested on x86_64-pc-linux-gnu. gcc/ChangeLog: PR debug/107193 * tree-cfg.cc (assign_discriminators): Move declaration of cur_locus_e out of the loop. --- gcc/tree-cfg.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Comments
On Mon, Oct 10, 2022 at 5:37 PM Eugene Rozenfeld <Eugene.Rozenfeld@microsoft.com> wrote: > > The bug was introduced in f30e9fd33e56a5a721346ea6140722e1b193db42. > A variable (cur_locus_e) was incorrectly declared inside a loop. > I also moved two other declarations (last and locus) down to make > the code more clear. > > Tested on x86_64-pc-linux-gnu. > > gcc/ChangeLog: > PR debug/107193 > * tree-cfg.cc (assign_discriminators): Move declaration of cur_locus_e > out of the loop. > --- > gcc/tree-cfg.cc | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc > index 41f2925665f..ae781871a19 100644 > --- a/gcc/tree-cfg.cc > +++ b/gcc/tree-cfg.cc > @@ -1204,9 +1204,8 @@ assign_discriminators (void) > edge e; > edge_iterator ei; > gimple_stmt_iterator gsi; > - gimple *last = last_stmt (bb); > - location_t locus = last ? gimple_location (last) : UNKNOWN_LOCATION; > location_t curr_locus = UNKNOWN_LOCATION; > + expanded_location curr_locus_e = {}; > int curr_discr = 0; > > /* Traverse the basic block, if two function calls within a basic block > @@ -1215,7 +1214,7 @@ assign_discriminators (void) > for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) > { > gimple *stmt = gsi_stmt (gsi); > - expanded_location curr_locus_e; > + > if (curr_locus == UNKNOWN_LOCATION) > { > curr_locus = gimple_location (stmt); > @@ -1238,6 +1237,8 @@ assign_discriminators (void) > curr_discr = next_discriminator_for_locus (curr_locus); > } > > + gimple *last = last_stmt (bb); > + location_t locus = last ? gimple_location (last) : UNKNOWN_LOCATION; > if (locus == UNKNOWN_LOCATION) > continue; > > -- > 2.25.1 > It restored bootstrap for me. Thanks.
On 10/10/22 20:36, Eugene Rozenfeld wrote: > The bug was introduced in f30e9fd33e56a5a721346ea6140722e1b193db42. > A variable (cur_locus_e) was incorrectly declared inside a loop. > I also moved two other declarations (last and locus) down to make > the code more clear. > > Tested on x86_64-pc-linux-gnu. OK. > gcc/ChangeLog: > PR debug/107193 > * tree-cfg.cc (assign_discriminators): Move declaration of cur_locus_e > out of the loop. > --- > gcc/tree-cfg.cc | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc > index 41f2925665f..ae781871a19 100644 > --- a/gcc/tree-cfg.cc > +++ b/gcc/tree-cfg.cc > @@ -1204,9 +1204,8 @@ assign_discriminators (void) > edge e; > edge_iterator ei; > gimple_stmt_iterator gsi; > - gimple *last = last_stmt (bb); > - location_t locus = last ? gimple_location (last) : UNKNOWN_LOCATION; > location_t curr_locus = UNKNOWN_LOCATION; > + expanded_location curr_locus_e = {}; > int curr_discr = 0; > > /* Traverse the basic block, if two function calls within a basic block > @@ -1215,7 +1214,7 @@ assign_discriminators (void) > for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) > { > gimple *stmt = gsi_stmt (gsi); > - expanded_location curr_locus_e; > + > if (curr_locus == UNKNOWN_LOCATION) > { > curr_locus = gimple_location (stmt); > @@ -1238,6 +1237,8 @@ assign_discriminators (void) > curr_discr = next_discriminator_for_locus (curr_locus); > } > > + gimple *last = last_stmt (bb); > + location_t locus = last ? gimple_location (last) : UNKNOWN_LOCATION; > if (locus == UNKNOWN_LOCATION) > continue; >
On 10/10/22 18:36, Eugene Rozenfeld via Gcc-patches wrote: > The bug was introduced in f30e9fd33e56a5a721346ea6140722e1b193db42. > A variable (cur_locus_e) was incorrectly declared inside a loop. > I also moved two other declarations (last and locus) down to make > the code more clear. > > Tested on x86_64-pc-linux-gnu. > > gcc/ChangeLog: > PR debug/107193 > * tree-cfg.cc (assign_discriminators): Move declaration of cur_locus_e > out of the loop. Thanks. I suspect this caused the hppa bootstrap failure due to comparison mismatch as well. Given it's an 8hr build, I'm inclined to just restart it once this patch goes in and hope rather than bisect :-) jeff
diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index 41f2925665f..ae781871a19 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -1204,9 +1204,8 @@ assign_discriminators (void) edge e; edge_iterator ei; gimple_stmt_iterator gsi; - gimple *last = last_stmt (bb); - location_t locus = last ? gimple_location (last) : UNKNOWN_LOCATION; location_t curr_locus = UNKNOWN_LOCATION; + expanded_location curr_locus_e = {}; int curr_discr = 0; /* Traverse the basic block, if two function calls within a basic block @@ -1215,7 +1214,7 @@ assign_discriminators (void) for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) { gimple *stmt = gsi_stmt (gsi); - expanded_location curr_locus_e; + if (curr_locus == UNKNOWN_LOCATION) { curr_locus = gimple_location (stmt); @@ -1238,6 +1237,8 @@ assign_discriminators (void) curr_discr = next_discriminator_for_locus (curr_locus); } + gimple *last = last_stmt (bb); + location_t locus = last ? gimple_location (last) : UNKNOWN_LOCATION; if (locus == UNKNOWN_LOCATION) continue;