https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90578
--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- > Can you please explain what you expect? As usual, the impossible;-) More seriously: (1) the test suite should not invoke undefined behavior, i.e., the test gfortran.dg/lrshift_1.f90 should be fixed. (2) The gfortran manual should be improved: (a) In the entries SHIFTA, SHIFTL, and SHIFTR, "If the absolute value of SHIFT is greater than BIT_SIZE(I), the value is undefined" should be replaced with "SHIFT shall be nonnegative and less than or equal to BIT_SIZE (I)". IMO the former wording suggest that SHIFT can be negative. (b) LSHIFT and RSHIFT are extensions and should behave as in other compilers, e.g., fort. If the common behavior is that negative values of SHIFT are rejected, the manual should be changed as in (a). (3) It would nice to have a run-time check.