> 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 > > >