bit manipulation functions
Steve Kargl
sgk@troutmask.apl.washington.edu
Sun Dec 5 19:30:00 GMT 2004
On Sun, Dec 05, 2004 at 06:40:59PM +0000, Paul Brook wrote:
> On Sunday 05 December 2004 18:00, Steve Kargl wrote:
> > Gang,
> >
> > It seems that our bit manipulation functions are more
> > restrictive than implied by the language of the standard
> > (where I only have a PDF of the May 2004 working draft of
> > the newest standard). Anyway, the language for IBSET is
> <snip>
> > This agrees with both G77 and NAG's Fortran 95 compiler. So, do
> > we want to loosen the restrictions?
>
> Yes, although you'll need to check that the actual implementations DTRT,
> particularly is library calls are used. You'll may also need to add
> checks/conversions for intrinsics that take multiple arguments of the same
> type.
>
Okay, I start working on a patch for the bit intrinsics. One thing
we need to decide upon is the behavior of for example IAND(). The
g77 info file states
IAnd(I, J)
IAnd: `INTEGER' function, the exact type being the result of
cross-promoting the types of all the arguments.
The standard states
13.7.46 IAND (I, J)
Description. Performs a bitwise AND.
Class. Elemental function.
Arguments.
I shall be of type integer.
J shall be of type integer with the same kind type
parameter as I.
Do we want the standard's behavior or backwards compatibility with
g77?
--
Steve
More information about the Fortran
mailing list