From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5006 invoked by alias); 21 Jul 2014 14:05:46 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4965 invoked by uid 48); 21 Jul 2014 14:05:42 -0000 From: "y.gribov at samsung dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/61869] New: Spurious uninitialized warning Date: Mon, 21 Jul 2014 14:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: y.gribov at samsung dot com 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 cc cf_gcchost cf_gcctarget attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg01455.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61869 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=3D33167&action=3Dedit 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=20 /home/ygribov/repro.i: In function =E2=80=98void f(list*)=E2=80=99: /home/ygribov/repro.i:30:12: warning: =E2=80=98i=E2=80=99 may be used unini= tialized in this function [-Wmaybe-uninitialized] iterator i; ^ /home/ygribov/repro.i:30:12: warning: =E2=80=98*((void*)& i +8)=E2=80=99 ma= y 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: 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: List-Archive: List-Post: List-Help: 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" 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: 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?id=61870 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 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(); });