This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch,libfortran] PR31964 ishftc fails with certain thrid argument


Toon Moene wrote:
Jerry DeLisle wrote:

Fortran defines bit shifting up to and including bit_size of a value.

It turns out that shifting is undefined for >= bit_size bits.

Ugh, I'm sorry this wasn't know (I know it for years, because of bringing g77 up to date with the various standards).


Fortran allows shifts up to the width of the item.

C allows shifts up to the width minus one of the time.

Hope this helps,

Hi Toon,

Already sorted this out and a patch is submitted. If you could review and OK the patch, that would be helpful.

Jerry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]