The following fails when I build binutils with: configure --build=x86_64-linux --disable-nls --disable-gdb --disable-gdbserver --disable-sim --disable-readline --disable-libdecnumber --enable-obsolete --target=arm-elf CFLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" CXXLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" LDFLAGS="-ldl" Target: arm-elf FAIL: STM32L4XX erratum fix LDM Executing on host: sh -c {/dev/shm/b6evfmmd/ld/../gas/as-new -I/home/mliska/Programming/binutils/ld/testsuite/ld-arm -o tmpdir/stm32l4xx-fix-vldm.o -EL -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 /home/mliska/Programming/binutils/ld/testsuite/ld-arm/stm32l4xx-fix-vldm.s 2>&1} /dev/null ld.tmp (timeout = 300) /home/mliska/Programming/binutils/gas/config/tc-arm.c:2283:28: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7af677524e205f3c343707d61bccd4dfd74089da commit 7af677524e205f3c343707d61bccd4dfd74089da Author: Alan Modra <amodra@gmail.com> Date: Tue Sep 1 11:35:37 2020 +0930 PR26420, PR26421, PR26425, PR26427 UBSAN: tc-arm.c left shifts PR 26420 PR 26421 PR 26425 PR 26427 * config/tc-arm.c (struct arm_it): Make size, size_req, cond and uncond_value unsigned. (parse_vfp_reg_list): Make setmask unsigned, vpr_str_len size_t. (parse_big_immediate): Cast generic_bignum elements to unsigned. (encode_thumb32_immediate): Shift left 0xffU. (double_to_single): Make sign unsigned. Tidy. (move_or_literal_pool): Cast LITTLE_NUM elements to uint64_t or valueT. (vfp_or_neon_is_neon): Adjust inst.uncond_value expression. (md_assemble): Likewise. (handle_pred_state): Make cond unsigned. (thumb32_negate_data_op): Make variables unsigned. (md_apply_fix): Make value and newval unsigned, adjust uses.
fixed