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

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