public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/66452] New: [6 Regression] [UBSAN] *.Lubsan_data0' defined but not used
@ 2015-06-07 20:13 dimhen at gmail dot com
  2015-06-08  8:18 ` [Bug sanitizer/66452] " mpolacek at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dimhen at gmail dot com @ 2015-06-07 20:13 UTC (permalink / raw)
  To: gcc-bugs

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)


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

end of thread, other threads:[~2015-06-08 10:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-07 20:13 [Bug sanitizer/66452] New: [6 Regression] [UBSAN] *.Lubsan_data0' defined but not used dimhen at gmail dot com
2015-06-08  8:18 ` [Bug sanitizer/66452] " mpolacek at gcc dot gnu.org
2015-06-08  8:34 ` mpolacek at gcc dot gnu.org
2015-06-08  8:36 ` dimhen at gmail dot com
2015-06-08  8:45 ` mpolacek at gcc dot gnu.org
2015-06-08 10:36 ` mpolacek at gcc dot gnu.org
2015-06-08 10:36 ` mpolacek 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).