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

--- Comment #1 from Sergei Trofimovich <slyfox at inbox dot ru> ---
On today's gcc master configured as:

$ ~/dev/git/gcc-native-quick/gcc/xg++
-B/home/slyfox/dev/git/gcc-native-quick/gcc/ -v # -march=sandybridge -O2 -Wall
-c bug.cc -o bug.o -
Reading specs from /home/slyfox/dev/git/gcc-native-quick/gcc/specs
COLLECT_GCC=/home/slyfox/dev/git/gcc-native-quick/gcc/xg++
COLLECT_LTO_WRAPPER=/home/slyfox/dev/git/gcc-native-quick/gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--enable-languages=c,c++ --disable-bootstrap --with-multilib-list=m64
--prefix=/home/slyfox/dev/git/gcc-native-quick/../gcc-native-quick-installed
--disable-nls --without-isl --disable-libsanitizer --disable-libvtv
--disable-libgomp --disable-libstdcxx-pch --disable-libunwind-exceptions
CFLAGS='-O1 ' CXXFLAGS='-O1 ' --with-sysroot=/usr/x86_64-HEAD-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20200619 (experimental) (GCC)

crash is reproducible:

$ ~/dev/git/gcc-native-quick/gcc/xg++
-B/home/slyfox/dev/git/gcc-native-quick/gcc/ -march=sandybridge -O2 -Wall -c
bug.cc -o bug.o
bug.cc: In constructor 'p::p(a::c)':
bug.cc:32:26: warning: '*<unknown>.p::alloc' is used uninitialized
[-Wuninitialized]
   32 |     header = (n *)malloc(alloc);
      |                          ^~~~~
'
during GIMPLE pass: uninit
In function 'void s()':
Segmentation fault
   37 | void s() { p(a::q); }
      |      ^
0x7f7b2395dc3f ???
       
/usr/src/debug/sys-libs/glibc-2.31-r5/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x7f7b23948d49 __libc_start_main
        ../csu/libc-start.c:308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to