https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123390
Bug ID: 123390
Summary: UBSAN: arm: gcc/config/arm/arm.cc:5435:48: runtime
error: signed integer overflow: -2147483648 - 1 cannot
be represented in type 'int'
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
I get the line in the title from a bootstrap
of current trunk gcc on arm raspberry PI 5.
The line of code is
&& (remainder & ((1 << set_zero_bit_copies) - 1)) == remainder)
and the configure command is
CFLAGS="-g1 -O2 -march=native" \
CXXFLAGS="-g1 -O2 -march=native" \
../trunk/configure \
--disable-doc \
--disable-multilib \
--with-build-config="bootstrap-ubsan" \
--enable-checking=yes \
--enable-languages=c,c++ \
--with-cpu=cortex-a76 \
--with-fpu=neon-fp-armv8 \
--with-float=hard \
--build=arm-linux-gnueabihf \
--host=arm-linux-gnueabihf \
--target=arm-linux-gnueabihf
git blame says:
^4ef521bbc6 (Jason Merrill 2022-12-14 17:42:52 -0500 5435) &&
(remainder & ((1 << set_zero_bit_copies) - 1)) == remainder)