https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90578
--- Comment #6 from anlauf at gcc dot gnu.org --- (In reply to Dominique d'Humieres from comment #5) > Compiling > > print *, lshift(1,-1) > end > > gives the following error > > lshift.f90:1:16: > > 1 | print *, lshift(1,-1) > | 1 > Error: Second argument of LSHIFT is negative at (1) > > While > > print *, ishft(2,-1) > end > > gives > > 1 Can you please explain what you expect? Keep the current implementation, where negative shifts are disallowed for lshift/rshift? Then fix the documentation, explaining that negative shifts have undefined behavior. Related testcases in the testsuite need to be fixed. Or allow negative shifts, as in ishft?