public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/103984] [12 regression] Possible maybe-uninitialized false positive on shaderc-2021.0 since r12-6329
Date: Wed, 26 Jan 2022 19:03:25 +0000	[thread overview]
Message-ID: <bug-103984-4-QZB8gRG6h4@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103984-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103984

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #5)
> It is surprising that we warn with a user-provided copy constructor and
> don't with a defaulted constructor.  It changes the code a bit because it
> means string_piece isn't trivially copyable, so we need to create a
> string_piece temporary for passing to to_stage instead of passing arg
> directly by bitwise copy, but I don't know why that would confuse the
> optimizers into thinking that _M_p might be uninitialized.

The diff of the GIMPLE is

@@ -40,10 +39,7 @@
                 D$ = 1;
                 try
                   {
-                    string_piece::string_piece (&D$, &arg);
-                    try
-                      {
-                        _2 = to_stage (&D$);
+                        _2 = to_stage (arg);
                         D$.stage = _2;
                         D$ = 0;
                         try
@@ -62,11 +58,6 @@
                             D$ = {CLOBBER};
                           }
                       }
-                    finally
-                      {
-                        D$ = {CLOBBER};
-                      }
-                  }
                 catch
                   {
                     if (D$ != 0) goto <D$>; else goto <D$>;

  parent reply	other threads:[~2022-01-26 19:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 22:18 [Bug c++/103984] New: [12 regression] Possible maybe-uninitialized false positive on shaderc-2021.0 slyfox at gcc dot gnu.org
2022-01-11 22:31 ` [Bug c++/103984] " pinskia at gcc dot gnu.org
2022-01-11 22:34 ` pinskia at gcc dot gnu.org
2022-01-12  7:39 ` rguenth at gcc dot gnu.org
2022-01-12  8:29 ` jakub at gcc dot gnu.org
2022-01-26 17:48 ` [Bug c++/103984] [12 regression] Possible maybe-uninitialized false positive on shaderc-2021.0 since r12-6329 jason at gcc dot gnu.org
2022-01-26 18:35 ` jason at gcc dot gnu.org
2022-01-26 19:03 ` jason at gcc dot gnu.org [this message]
2022-01-26 19:25 ` [Bug middle-end/103984] " jason at gcc dot gnu.org
2022-03-01 15:04 ` marxin at gcc dot gnu.org
2022-03-01 15:26 ` [Bug middle-end/103984] [12 regression] Possible maybe-uninitialized false positive on shaderc-2021.0 since r12-6329-g4f6bc28fc7dd86bd cvs-commit at gcc dot gnu.org
2022-03-15 14:22 ` jakub at gcc dot gnu.org
2022-03-15 15:06 ` jakub at gcc dot gnu.org
2022-03-15 15:16 ` jakub at gcc dot gnu.org
2022-03-15 15:55 ` jakub at gcc dot gnu.org
2022-03-15 16:55 ` jakub at gcc dot gnu.org
2022-03-15 18:00 ` jakub at gcc dot gnu.org
2022-03-16  8:47 ` jakub at gcc dot gnu.org
2022-03-16  8:58 ` jakub at gcc dot gnu.org
2022-03-17  8:26 ` cvs-commit at gcc dot gnu.org
2022-03-17  8:46 ` jakub at gcc dot gnu.org

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=bug-103984-4-QZB8gRG6h4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).