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.
Sorry for skipping this for so long, usually ODR stuff is... interesting to the point I gladly leave it to 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. Thanks, Martin