[Bug target/106097] undefined behaviors regarding integer shifts in loongarch_build_integer

xry111 at mengyan1223 dot wang gcc-bugzilla@gcc.gnu.org
Mon Jun 27 05:05:01 GMT 2022


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

--- Comment #3 from Xi Ruoyao <xry111 at mengyan1223 dot wang> ---
(In reply to Andrew Pinski from comment #2)
> by using the --with-build-config=bootstrap-ubsan option at configure time or
> BUILD_CONFIG variable to build time.
> 
> See https://gcc.gnu.org/install/build.html

The problem is -fsanitize=undefined does not work on LoongArch for now.  But it
can be reproduced by building a cross compile on x86_64:

/path/to/gcc/configure --target=loongarch64-linux-gnu
make {C,CXX}FLAGS="-O2 -g -fsanitize=undefined" all-gcc


More information about the Gcc-bugs mailing list