public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/67196] Another false positive from -Wmaybe-uninitialized
Date: Wed, 12 Aug 2015 20:26:00 -0000	[thread overview]
Message-ID: <bug-67196-4-px8VYMjBdu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-67196-4@http.gcc.gnu.org/bugzilla/>

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-08-12
                 CC|                            |manu at gcc dot gnu.org
             Blocks|                            |24639
     Ever confirmed|0                           |1

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
For some reason, the uninit pass does not even analyze the predicates and
thinks all uses are unguarded (or it doesn't dump it).

A shorter testcase:

int some_test(int);

int test (int n)
{
  int num_captions_in_row = 0;
  int first_caption = 0; /* set to zero here */
  int first_caption_idx;
  int i;
  for (i = 0; i < n; i++)
    {
      if (some_test (i))
        {
          num_captions_in_row++;
          first_caption = 1; /* only ever set here */
          first_caption_idx = i; /* set here */
        }
    }

  /* The guard on "first_caption" here requires we entered the block
     above that sets "first_caption_idx". */
  if (first_caption && num_captions_in_row == 1)
    return first_caption_idx; /* get bogus warning here at -O1 and above */
  return 0;
}


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639
[Bug 24639] [meta-bug] bug to track all Wuninitialized issues
>From gcc-bugs-return-494688-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Aug 12 21:00:20 2015
Return-Path: <gcc-bugs-return-494688-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 57861 invoked by alias); 12 Aug 2015 21:00:20 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 57820 invoked by uid 55); 12 Aug 2015 21:00:16 -0000
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/67172] [5/6 regression] i686-w64-mingw32 dwarf2 bootstrap fails with undefined reference to __EH_FRAME_BEGIN__
Date: Wed, 12 Aug 2015 21:00:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: joseph at codesourcery dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-67172-4-HLt4a4FBt5@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67172-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67172-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-08/txt/msg00830.txt.bz2
Content-length: 831

https://gcc.gnu.org/bugzilla/show_bug.cgi?idg172

--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Tue, 11 Aug 2015, breedlove.matt at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?idg172
>
> --- Comment #3 from Matt Breedlove <breedlove.matt at gmail dot com> ---
> In gcc/defaults.h, it gets defined via:

So why does not exactly the same sequence of conditional macro definitions
apply when libgcc is being built and so cause your patch to be
ineffective, given that libgcc does still include the host-side tm.h until
the transition away from host-side target macros in target-side code is
complete?  (In any case, my point still applies: stop
__LIBGCC_EH_FRAME_SECTION_NAME__ being defined if it's incorrect, which
means some sort of host-side change.)


  reply	other threads:[~2015-08-12 20:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12 19:03 [Bug tree-optimization/67196] New: " dmalcolm at gcc dot gnu.org
2015-08-12 20:26 ` manu at gcc dot gnu.org [this message]
2021-03-31 19:44 ` [Bug tree-optimization/67196] [9/10/11 Regression] loop-induced " msebor at gcc dot gnu.org
2021-04-08 14:24 ` rguenth at gcc dot gnu.org
2021-06-01  8:06 ` [Bug tree-optimization/67196] [9/10/11/12 " rguenth at gcc dot gnu.org
2022-01-21 13:53 ` rguenth at gcc dot gnu.org
2022-05-27  9:35 ` [Bug tree-optimization/67196] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:31 ` jakub at gcc dot gnu.org
2022-08-30  9:40 ` rguenth at gcc dot gnu.org
2022-08-30 11:15 ` cvs-commit at gcc dot gnu.org
2022-11-20  3:56 ` [Bug tree-optimization/67196] [10/11/12 " law at gcc dot gnu.org
2022-11-21  6:47 ` rguenth at gcc dot gnu.org
2023-07-07  7:28 ` [Bug tree-optimization/67196] [11/12 " rguenth 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-67196-4-px8VYMjBdu@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).