Hello, On Wed, May 10 2023, Eugene Rozenfeld via Gcc-patches wrote: > autoprofiledbootstrap build produces new warnings since inlining decisions > are different from other builds. This patch contains fixes and workarounds > for those warnings. > > Tested on x86_64-pc-linux-gnu. > > gcc/ChangeLog: > > * config/i386/i386-expand.cc (expand_vec_perm_interleave2): Work around > -Wstringop-overflow false positive during autoprofiledbootstrap > * ipa-devirt.cc (debug_tree_odr_name): Fix for -Wformat-overflow > warning during autoprofiledbootstrap > * lra-eliminations.cc (setup_can_eliminate): Work around > -Wmaybe-uninitialized false positive during autoprofiledbootstrap > * opts-common.cc (candidates_list_and_hint): Work around > -Wstringop-overflow false positive during autoprofiledbootstrap > * tree-ssa-ccp.cc (bit_value_unop): Work around -Wmaybe-uninitialized > false positive during autoprofiledbootstrap > * wide-int.h (wi::copy): Work around -Wmaybe-uninitialized false > positive during autoprofiledbootstrap > --- > gcc/config/i386/i386-expand.cc | 11 +++++++++++ > gcc/ipa-devirt.cc | 3 ++- > gcc/lra-eliminations.cc | 11 +++++++++++ > gcc/opts-common.cc | 1 + > gcc/tree-ssa-ccp.cc | 11 +++++++++++ > gcc/wide-int.h | 11 +++++++++++ > 6 files changed, 47 insertions(+), 1 deletion(-) >
[...] > diff --git a/gcc/ipa-devirt.cc b/gcc/ipa-devirt.cc > index 819860258d1..36ea266e834 100644 > --- a/gcc/ipa-devirt.cc > +++ b/gcc/ipa-devirt.cc > @@ -4033,7 +4033,8 @@ debug_tree_odr_name (tree type, bool demangle) > odr = cplus_demangle (odr, opts); > } > > - fprintf (stderr, "%s\n", odr); > + if (odr != NULL) > + fprintf (stderr, "%s\n", odr); > } I cannot find a call to this debug function on trunk. How exactly did this trigger a warning? In any case, IMHO the function should rather print something that makes it clear that an odr name could not be obtained rather than printing nothing. I also think that if we want to handle the case, we should do it before also possibly passing odr to demangler. Thanks, Martin