From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id 9BDF238582A1 for ; Tue, 7 Feb 2023 00:35:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9BDF238582A1 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=none smtp.mailfrom=kam.mff.cuni.cz Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id CF5E3281D6E; Tue, 7 Feb 2023 01:35:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1675730104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fBKdhkE/94Q49HoJytzE7OtxB2zePBDUm0a5UxZ4A6M=; b=gVNK/sTn7Mh5fhNRBQN4CU9q6iwW5hxicR0YhIklrw4Bj1EXm8giH6jx32mvq7FZ11JCZZ E/D+tXeBrnzPxDAPkTsHaaObPueYX7AN8PH+4gaoutXu1uvg0v2LjJJn3qHZaCpZIq7g9y DVgaZjLjdhqmw3jo+OwPrXl85VYbDHA= Date: Tue, 7 Feb 2023 01:35:04 +0100 From: Jan Hubicka To: Martin =?iso-8859-2?Q?Li=B9ka?= Cc: Martin Jambor , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] ipa: silent -Wodr notes with -w Message-ID: References: <160b53bd-0747-9699-2fef-62415bb6450f@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <160b53bd-0747-9699-2fef-62415bb6450f@suse.cz> X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > On 2/1/23 15:26, Martin Jambor wrote: > > Hi, > > > > On Fri, Dec 02 2022, Martin Liška wrote: > > > If -w is used, warn_odr properly sets *warned = false and > > > so it should be preserved when calling warn_types_mismatch. > > > > > > Noticed that during a LTO reduction where I used -w. > > > > > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > > > > > Ready to be installed? > > > Thanks, > > > Martin > > > > > > gcc/ChangeLog: > > > > > > * ipa-devirt.cc (odr_types_equivalent_p): Respect *warned > > > value if set. > > > > Hi. > > > Sorry for skipping this for so long, usually ODR stuff is... interesting > > to the point I gladly leave it to Honza. > > Makes sense, however, he's not much active when it comes to patch review. Sorry, I was confused by the patch and delayed reply to figure out what you are trying to fix. Indeed the dererence is missing here, however every caller that sets warn to true should also set warned to non-NULL. So indeed derefernce is missing, but I think the check for warned == NULL should not be necessary. Honza > > > > > Please go ahead and commit the patch. The way I read the code, your > > version must have been the intended behavior and the dereference is > > missing. > > Yep, the patch seems to me quite straightforward. > > Thanks, > Martin > > > > > Thanks, > > > > Martin > > >