public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/61869] New: Spurious uninitialized warning
@ 2014-07-21 14:05 y.gribov at samsung dot com
  2014-07-21 19:16 ` [Bug tree-optimization/61869] " manu at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: y.gribov at samsung dot com @ 2014-07-21 14:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61869
           Summary: Spurious uninitialized warning
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: y.gribov at samsung dot com
                CC: jakub at gcc dot gnu.org
              Host: x86_64-unknown-linux-gnu
            Target: x86_64-unknown-linux-gnu

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

Current gcc reports spurious warning on attached code (based upon gcc/asan.c
with some local changes):
 $ g++ repro.i -c -Wmaybe-uninitialized -O2 
/home/ygribov/repro.i: In function ‘void f(list*)’:
/home/ygribov/repro.i:30:12: warning: ‘i’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
   iterator i;
            ^
/home/ygribov/repro.i:30:12: warning: ‘*((void*)& i +8)’ may be used
uninitialized in this function [-Wmaybe-uninitialized]

It looks like lim1 pass exploits conditional NULL dereference in start() and
introduces read of uninitialized variable.
>From gcc-bugs-return-456865-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jul 21 14:22:47 2014
Return-Path: <gcc-bugs-return-456865-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27817 invoked by alias); 21 Jul 2014 14:22:47 -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 27750 invoked by uid 48); 21 Jul 2014 14:22:42 -0000
From: "dzidzitop at vfemail dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61870] New: internal compiler error: in get_expr_operands, at tree-ssa-operands.c:1035
Date: Mon, 21 Jul 2014 14:22:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.7.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dzidzitop at vfemail dot net
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-61870-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: 2014-07/txt/msg01456.txt.bz2
Content-length: 1112

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

            Bug ID: 61870
           Summary: internal compiler error: in get_expr_operands, at
                    tree-ssa-operands.c:1035
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dzidzitop at vfemail dot net

When I compile source code I see the following error.

src/lastfm_scrobbler.cpp: In lambda function:
src/lastfm_scrobbler.cpp:193:1: internal compiler error: in get_expr_operands,
at tree-ssa-operands.c:1035
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
Preprocessed source stored into /tmp/cc6F4c5e.out file, please attach this to
your bugreport.

The line that does not compile is:
m_scrobblingThread = std::thread([this]() { backgroundScrobbling(); });

The following change fixes this:
m_scrobblingThread = std::thread([this]() { this->backgroundScrobbling(); });


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

* [Bug tree-optimization/61869] Spurious uninitialized warning
  2014-07-21 14:05 [Bug tree-optimization/61869] New: Spurious uninitialized warning y.gribov at samsung dot com
@ 2014-07-21 19:16 ` manu at gcc dot gnu.org
  2021-03-29 22:00 ` [Bug tree-optimization/61869] Spurious uninitialized warning (lim1 pass, pretty-printed internal var) msebor at gcc dot gnu.org
  2021-03-29 22:01 ` cvs-commit at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: manu at gcc dot gnu.org @ 2014-07-21 19:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-07-21
                 CC|                            |manu at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Yury Gribov from comment #0)
> Created attachment 33167 [details]
> /home/ygribov/repro.i:30:12: warning: ‘*((void*)& i +8)’ may be used
> uninitialized in this function [-Wmaybe-uninitialized]

Sad we are still printing this **** to the user (even if the warning were
valid)
>From gcc-bugs-return-456882-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jul 21 19:22:50 2014
Return-Path: <gcc-bugs-return-456882-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14778 invoked by alias); 21 Jul 2014 19:22:50 -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 14712 invoked by uid 48); 21 Jul 2014 19:22:45 -0000
From: "pthaugen at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/61396] [4.10 regression] ICE in simplify_immed_subreg
Date: Mon, 21 Jul 2014 19:22:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.10.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: pthaugen at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.10.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61396-4-FATCYM3kDE@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61396-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61396-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: 2014-07/txt/msg01473.txt.bz2
Content-length: 285

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

--- Comment #4 from Pat Haugen <pthaugen at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #3)
> Revision r209530 is OK, r210534 is not, likely a wide-int fallout.
>
The problem first appeared in trunk revision 210113.


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

* [Bug tree-optimization/61869] Spurious uninitialized warning (lim1 pass, pretty-printed internal var)
  2014-07-21 14:05 [Bug tree-optimization/61869] New: Spurious uninitialized warning y.gribov at samsung dot com
  2014-07-21 19:16 ` [Bug tree-optimization/61869] " manu at gcc dot gnu.org
@ 2021-03-29 22:00 ` msebor at gcc dot gnu.org
  2021-03-29 22:01 ` cvs-commit at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-03-29 22:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to work|                            |5.3.0, 6.3.0
   Target Milestone|---                         |7.0
         Resolution|---                         |FIXED
                 CC|                            |msebor at gcc dot gnu.org

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Fixed in r245840.

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

* [Bug tree-optimization/61869] Spurious uninitialized warning (lim1 pass, pretty-printed internal var)
  2014-07-21 14:05 [Bug tree-optimization/61869] New: Spurious uninitialized warning y.gribov at samsung dot com
  2014-07-21 19:16 ` [Bug tree-optimization/61869] " manu at gcc dot gnu.org
  2021-03-29 22:00 ` [Bug tree-optimization/61869] Spurious uninitialized warning (lim1 pass, pretty-printed internal var) msebor at gcc dot gnu.org
@ 2021-03-29 22:01 ` cvs-commit at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-29 22:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:af739c8797d4cdf550366d0ef48136e0073df5c9

commit r11-7899-gaf739c8797d4cdf550366d0ef48136e0073df5c9
Author: Martin Sebor <msebor@redhat.com>
Date:   Mon Mar 29 15:58:01 2021 -0600

    PR tree-optimization/61869 - Spurious uninitialized warning

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

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

end of thread, other threads:[~2021-03-29 22:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-21 14:05 [Bug tree-optimization/61869] New: Spurious uninitialized warning y.gribov at samsung dot com
2014-07-21 19:16 ` [Bug tree-optimization/61869] " manu at gcc dot gnu.org
2021-03-29 22:00 ` [Bug tree-optimization/61869] Spurious uninitialized warning (lim1 pass, pretty-printed internal var) msebor at gcc dot gnu.org
2021-03-29 22:01 ` cvs-commit 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).