This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch,libfortran] PR31964 ishftc fails with certain thrid argument
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: Jerry DeLisle <jvdelisle at verizon dot net>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 18 May 2007 16:52:04 +0200
- Subject: Re: [patch,libfortran] PR31964 ishftc fails with certain thrid argument
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <464CFE0D.90907@verizon.net>
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,
--
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.indiv.nluug.nl/~toon/
Who's working on GNU Fortran:
http://gcc.gnu.org/ml/gcc/2007-01/msg00059.html