public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/99919] [9/10/11 Regression] bogus -Wmaybe-uninitialized with a _Bool bit-field
Date: Mon, 05 Apr 2021 20:51:47 +0000	[thread overview]
Message-ID: <bug-99919-4-IljzjY2Y3u@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99919-4@http.gcc.gnu.org/bugzilla/>

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |99918

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
The IL below shows there is enough information in the IL for the warning to
determine that x_5 is never read from.

void g (struct B b)
{
  _Bool b$j;
  _Bool b$i;
  _Bool x;
  unsigned char _1;
  unsigned char _2;
  unsigned char _3;
  unsigned char _4;

  <bb 2> [local count: 1073741824]:
  b$i_11 = b.i;
  _1 = VIEW_CONVERT_EXPR<unsigned char>(b);
  _2 = _1 & 1;
  if (_2 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870912]:

  <bb 4> [local count: 1073741824]:
  # x_5 = PHI <x_8(D)(2), b$i_11(3)>
  # b$j_10 = PHI <0(2), b$i_11(3)>
  b.j = b$j_10;
  _3 = VIEW_CONVERT_EXPR<unsigned char>(b);
  _4 = _3 & 2;
  if (_4 != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 536870913]:
  z = x_5;

  <bb 6> [local count: 1073741824]:
  return;

}


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99918
[Bug 99918] [9/10/11 Regression] suboptimal code for bool bitfield tests

  reply	other threads:[~2021-04-05 20:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 20:29 [Bug tree-optimization/99919] New: " msebor at gcc dot gnu.org
2021-04-05 20:51 ` msebor at gcc dot gnu.org [this message]
2021-04-06  8:39 ` [Bug tree-optimization/99919] " rguenth at gcc dot gnu.org
2021-04-08 14:22 ` rguenth at gcc dot gnu.org
2021-06-01  8:20 ` [Bug tree-optimization/99919] [9/10/11/12 " rguenth at gcc dot gnu.org
2021-11-30 11:58 ` aldyh at gcc dot gnu.org
2021-11-30 12:06 ` pinskia at gcc dot gnu.org
2021-11-30 14:22 ` aldyh at gcc dot gnu.org
2022-12-08  9:25 ` [Bug tree-optimization/99919] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-12-08 10:47 ` rguenth at gcc dot gnu.org
2023-04-26  6:55 ` [Bug tree-optimization/99919] [10/11/12/13/14 " rguenth at gcc dot gnu.org
2023-07-27  9:22 ` [Bug tree-optimization/99919] [11/12/13/14 " rguenth at gcc dot gnu.org
2023-12-15 13:33 ` rguenth at gcc dot gnu.org
2024-05-21  9:10 ` [Bug tree-optimization/99919] [11/12/13/14/15 " 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-99919-4-IljzjY2Y3u@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).