public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/65178] New: incorrect -Wmaybe-uninitialized when nested loops
@ 2015-02-23 16:45 winter-gcc@bfw-online.de
  2015-02-24 12:21 ` [Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: winter-gcc@bfw-online.de @ 2015-02-23 16:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65178
           Summary: incorrect -Wmaybe-uninitialized when nested loops
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: winter-gcc@bfw-online.de

Created attachment 34845
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34845&action=edit
Testcase

This program incorrectly warns about an uninitialized variable.
If one is to delete the innermost loop definition (leaving the loop body
intact), the warning would not be displayed.

--- main.c      2015-02-23 16:48:56.027694790 +0100
+++ main2.c     2015-02-23 16:49:13.585385504 +0100
@@ -10,7 +10,7 @@
 { char *buf;
   char *p = 0;
   for (bool a = true;; a = false)
-  { for (char *s = c; *s; ++s)
+  { // for (char *s = c; *s; ++s)
     { if (!a) *p = 'a';
     }
     if (!a) break;


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops
  2015-02-23 16:45 [Bug tree-optimization/65178] New: incorrect -Wmaybe-uninitialized when nested loops winter-gcc@bfw-online.de
@ 2015-02-24 12:21 ` rguenth at gcc dot gnu.org
  2015-02-25 10:28 ` winter-gcc@bfw-online.de
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-24 12:21 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |63278

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Related to PR63278.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops
  2015-02-23 16:45 [Bug tree-optimization/65178] New: incorrect -Wmaybe-uninitialized when nested loops winter-gcc@bfw-online.de
  2015-02-24 12:21 ` [Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using " rguenth at gcc dot gnu.org
@ 2015-02-25 10:28 ` winter-gcc@bfw-online.de
  2021-07-22 17:51 ` cvs-commit at gcc dot gnu.org
  2021-07-22 17:52 ` msebor at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: winter-gcc@bfw-online.de @ 2015-02-25 10:28 UTC (permalink / raw)
  To: gcc-bugs

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

Leon Winter <winter-gcc@bfw-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.9.1                       |5.0

--- Comment #3 from Leon Winter <winter-gcc@bfw-online.de> ---
Like, Manuel mentioned already, this in fact applies to gcc-5.0 as I was
mistaken on the version (executing gcc -v on the wrong machine)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops
  2015-02-23 16:45 [Bug tree-optimization/65178] New: incorrect -Wmaybe-uninitialized when nested loops winter-gcc@bfw-online.de
  2015-02-24 12:21 ` [Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using " rguenth at gcc dot gnu.org
  2015-02-25 10:28 ` winter-gcc@bfw-online.de
@ 2021-07-22 17:51 ` cvs-commit at gcc dot gnu.org
  2021-07-22 17:52 ` msebor at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-22 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:

https://gcc.gnu.org/g:b362d7947b37059fdb6de62145fa5146258dd58f

commit r12-2475-gb362d7947b37059fdb6de62145fa5146258dd58f
Author: Martin Sebor <msebor@redhat.com>
Date:   Thu Jul 22 11:49:33 2021 -0600

    Add new test for PR65178.

    gcc/testsuite/ChangeLog:
            PR tree-optimization/65178
            * gcc.dg/uninit-pr65178.c: New test.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops
  2015-02-23 16:45 [Bug tree-optimization/65178] New: incorrect -Wmaybe-uninitialized when nested loops winter-gcc@bfw-online.de
                   ` (2 preceding siblings ...)
  2021-07-22 17:51 ` cvs-commit at gcc dot gnu.org
@ 2021-07-22 17:52 ` msebor at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-07-22 17:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |7.0
         Resolution|---                         |FIXED
                 CC|                            |msebor at gcc dot gnu.org

--- Comment #18 from Martin Sebor <msebor at gcc dot gnu.org> ---
Bisection points to r246021 as the fix.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-22 17:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 16:45 [Bug tree-optimization/65178] New: incorrect -Wmaybe-uninitialized when nested loops winter-gcc@bfw-online.de
2015-02-24 12:21 ` [Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using " rguenth at gcc dot gnu.org
2015-02-25 10:28 ` winter-gcc@bfw-online.de
2021-07-22 17:51 ` cvs-commit at gcc dot gnu.org
2021-07-22 17:52 ` msebor at gcc dot gnu.org

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).