[Bug fortran/90578] Wrong code with LSHIFT and optimization
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Thu May 23 10:44:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90578
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |NEW
Resolution|INVALID |---
--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
LSHIFT is a GNU extension defined as
LSHIFT returns a value corresponding to I with all of the bits shifted left by
SHIFT places. If the absolute value of SHIFT is greater than BIT_SIZE(I), the
value is undefined. Bits shifted out from the left end are lost; zeros are
shifted in from the opposite end.
I don't see any mention of "left-shift by negative value is undefined".
If it is the case for the gfortran implementation, this should be documented.
More information about the Gcc-bugs
mailing list