public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Jambor <mjambor@suse.cz>
To: Eugene Rozenfeld <Eugene.Rozenfeld@microsoft.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fixes and workarounds for warnings during autoprofiledbootstrap build
Date: Wed, 10 May 2023 10:27:53 +0200	[thread overview]
Message-ID: <ri6mt2ch9py.fsf@suse.cz> (raw)
In-Reply-To: <MN0PR21MB348450698DEB069F231AF92E91779@MN0PR21MB3484.namprd21.prod.outlook.com>

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

  parent reply	other threads:[~2023-05-10  8:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10  1:38 Eugene Rozenfeld
2023-05-10  6:39 ` Richard Biener
2023-05-11  2:22   ` [EXTERNAL] " Eugene Rozenfeld
2023-05-11  8:57     ` Richard Biener
2023-05-12 20:35       ` Eugene Rozenfeld
2023-05-15  7:30         ` Richard Biener
2023-05-17  7:05           ` Thomas Schwinge
2023-05-18  5:53             ` Eugene Rozenfeld
2023-05-10  8:27 ` Martin Jambor [this message]
2023-05-11  2:17   ` Eugene Rozenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ri6mt2ch9py.fsf@suse.cz \
    --to=mjambor@suse.cz \
    --cc=Eugene.Rozenfeld@microsoft.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).