From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113302 invoked by alias); 7 Jun 2015 20:13:06 -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 113239 invoked by uid 48); 7 Jun 2015 20:13:03 -0000 From: "dimhen at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/66452] New: [6 Regression] [UBSAN] *.Lubsan_data0' defined but not used Date: Sun, 07 Jun 2015 20:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dimhen at gmail 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone 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: 2015-06/txt/msg00617.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66452 Bug ID: 66452 Summary: [6 Regression] [UBSAN] *.Lubsan_data0' defined but not used Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: dimhen at gmail dot com CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org Target Milestone: --- r224060 PASS r224193 FAIL $ g++ -Wall -O0 -fsanitize=undefined -c x.ii -fpreprocessed -o x.o x.ii: In member function 'A B::m_fn1() const': x.ii:9:12: warning: unused variable 'i' [-Wunused-variable] for (int i;;) ^ At global scope: cc1plus: warning: '*.Lubsan_data0' defined but not used [-Wunused-variable] $ cat x.ii class A { public: A(int); }; class B { A m_fn1() const; }; A B::m_fn1() const { for (int i;;) ; return 0; } $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /home/dimhen/src/gcc_current/configure --prefix=/usr/local/gcc_current --enable-static --enable-checking=yes,df,fold,rtl --enable-languages=c,c++,lto --enable-plugin --disable-libstdcxx-dual-abi --disable-multilib Thread model: posix gcc version 6.0.0 20150606 (experimental) [trunk revision 224193] (GCC) $ ~/bin/gcc_224060_rls/bin/g++ -v Using built-in specs. COLLECT_GCC=/home/dimhen/bin/gcc_224060_rls/bin/g++ COLLECT_LTO_WRAPPER=/home/dimhen/bin/gcc_224060_rls/bin/../libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /home/dimhen/src/gcc_r224060/configure --prefix=/usr/local/gcc_current --enable-static --enable-checking=release --enable-languages=c,c++,lto --enable-plugin --disable-libstdcxx-dual-abi --disable-multilib Thread model: posix gcc version 6.0.0 20150603 (experimental) [trunk revision 224060] (GCC)