https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118862
Bug ID: 118862 Summary: UBSAN: shift exponent too large since r15-7345-gc2a0ee58865c5a Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: jamborm at gcc dot gnu.org CC: tkoenig at gcc dot gnu.org Blocks: 63426 Target Milestone: --- Host: x86_64-linux Target: x86_64-linux With UBSAN instrumented compiler (revision ), compiling the testcase gfortran.dg/unsigned_44.f90 at -O3 fails with: /home/worker/buildworker/tiber-gcc-ubsan/build/gcc/fortran/trans-expr.cc:3650:44: runtime error: shift exponent 127 is too large for 64-bit type 'long unsigned int' To configure the compiler with UBSAN, bootstrap it with option --with-build-config=bootstrap-ubsan (we also only do release checking). I have bisected the failure to r15-7345-gc2a0ee58865c5a (Thomas Koenig: Add modular exponentiation for UNSIGNED.) Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426 [Bug 63426] [meta-bug] Issues found with -fsanitize=undefined