Bug ID 1157943
Summary gcc: crash at __libc_start_main ./csu/libc-start.c:308
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware aarch64
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Development
Assignee bnc-team-screening@forge.provo.novell.com
Reporter matwey.kornilov@gmail.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

Created attachment 825091 [details]
bitRotateRight.ii

When compiling this:

https://github.com/ClickHouse/ClickHouse

with this command:

/usr/bin/c++  -DBOOST_SYSTEM_NO_DEPRECATED -DLZ4_DISABLE_DEPRECATE_WARNINGS=1
-DPOCO_STATIC -DPOCO_UNBUNDLED_ZLIB -DWITH_GZFILEOP -DZLIB_COMPAT
-Idbms/src/Functions/include -Idbms/src/Core/include -I../dbms/src -Idbms/src
-I../libs/libcommon/include -Ilibs/libcommon/include -I../contrib/zlib-ng
-Icontrib/zlib-ng -I../contrib/cityhash102/include -I../contrib/croaring
-I../libs/libmysqlxx/include -I../contrib/mariadb-connector-c/include
-Icontrib/mariadb-connector-c/include -I../libs/consistent-hashing
-I../libs/consistent-hashing-sumbur -I../contrib/libfarmhash
-I../contrib/murmurhash/include -isystem ../contrib/libdivide -isystem
../contrib/libmetrohash/src -isystem ../contrib/sparsehash-c11 -isystem
../contrib/base64/include -isystem ../contrib/lz4/lib -isystem
../contrib/h3/src/h3lib/include -isystem ../contrib/rapidjson/include -isystem
../contrib/pdqsort -isystem ../contrib/libpcg-random/include -isystem
../contrib/double-conversion -isystem ../contrib/re2 -isystem
../contrib/poco/Util/include -isystem ../contrib/poco/Foundation/include
-isystem ../contrib/poco/XML/include -isystem ../contrib/poco/JSON/include
-isystem ../contrib/boost -isystem ../contrib/poco/Net/include -isystem
contrib/re2_st -isystem ../contrib/ssl/include -isystem
contrib/h3/src/h3lib/include -fdiagnostics-color=always -fsized-deallocation 
-march=native  -fno-omit-frame-pointer  -Wall  -Wnon-virtual-dtor
-Wno-array-bounds -Wextra -Werror -Wshadow -O3 -DNDEBUG   -D OS_LINUX
-fno-tree-loop-distribute-patterns -g0 -std=c++17 -MD -MT
dbms/src/Functions/CMakeFiles/clickhouse_functions.dir/bitRotateRight.cpp.o -MF
dbms/src/Functions/CMakeFiles/clickhouse_functions.dir/bitRotateRight.cpp.o.d
-o dbms/src/Functions/CMakeFiles/clickhouse_functions.dir/bitRotateRight.cpp.o
-c ../dbms/src/Functions/bitRotateRight.cpp

this happens:

during RTL pass: expand
In file included from ../dbms/src/Functions/bitRotateRight.cpp:2:
../dbms/src/Functions/FunctionBinaryArithmetic.h: In static member function
���static void DB::BinaryOperationImplBase<A, B, Op,
ResultType_>::vector_constant(DB::PaddedPODArray<T>&, B,
DB::PaddedPODArray<ResultType_>&) [with A = unsigned char; B = long unsigned
int; Op = DB::BitRotateRightImpl<unsigned char, long unsigned int>; ResultType_
= long unsigned int]���:
../dbms/src/Functions/FunctionBinaryArithmetic.h:73:13: internal compiler
error: in expand_shift_1, at expmed.c:2635
   73 |             c[i] = Op::template apply<ResultType>(a[i], b);
      |             ^
0xffffa8a013eb __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://bugs.opensuse.org/> for instructions.

with this system:

> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/aarch64-suse-linux/9/lto-wrapper
Target: aarch64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d --disable-werror
--with-gxx-include-dir=/usr/include/c++/9 --enable-ssp --disable-libssp
--disable-libvtv --disable-cet --disable-libcc1 --enable-plugin
--with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new
--disable-libstdcxx-pch --enable-libphobos
--enable-version-specific-runtime-libs --with-gcc-major-version-only
--enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function
--program-suffix=-9 --without-system-libunwind --enable-fix-cortex-a53-835769
--enable-fix-cortex-a53-843419 --with-build-config=bootstrap-lto-lean
--enable-link-mutex --build=aarch64-suse-linux --host=aarch64-suse-linux
Thread model: posix
gcc version 9.2.1 20190903 [gcc-9-branch revision 275330] (SUSE Linux) 
> uname -a
Linux localhost 5.3.8-1-default #1 SMP Wed Oct 30 07:12:05 UTC 2019 (ea4c828)
aarch64 aarch64 aarch64 GNU/Linux

I instead expect this code to compile properly because of gcc bug report hint.

Attached here is gzipped unreduced bitRotateRight.ii


You are receiving this mail because: