https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113092
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:0e7f5039c52a020c3ed5f18a2b3ee1fb42b78f62 commit r14-6778-g0e7f5039c52a020c3ed5f18a2b3ee1fb42b78f62 Author: Jakub Jelinek <ja...@redhat.com> Date: Thu Dec 21 11:14:55 2023 +0100 ubsan: Add workaround for missing bitint libubsan support for shifts [PR113092] libubsan still doesn't support bitints, so ubsan contains a workaround and emits value 0 and TK_Unknown kind for those. If shift second operand has the large/huge _BitInt type, this results in internal errors in libubsan though, so the following patch provides a temporary workaround for that - in the rare case where the last operand has _BitInt type wider than __int128 (or long long on 32-bit arches), it will pretend the shift count has that type saturated to its range. IMHO better than crashing in the library. If the value fits into the __int128 (or long long) range, it will be printed correctly (just print that it has __int128/long long type rather than say _BitInt(255)), if it doesn't, user will at least know that it is a very large negative or very large positive value. 2023-12-21 Jakub Jelinek <ja...@redhat.com> PR sanitizer/113092 * c-ubsan.cc (ubsan_instrument_shift): Workaround for missing ubsan _BitInt support for the shift count. * gcc.dg/ubsan/bitint-4.c: New test.