[gfortran] Adding quite a few intrinsics

Steve Kargl sgk@troutmask.apl.washington.edu
Wed Nov 9 18:36:00 GMT 2005


On Wed, Nov 09, 2005 at 05:33:49PM +0200, Janne Blomqvist wrote:
> On Wed, Nov 09, 2005 at 03:38:51PM +0100, FX Coudert wrote:
> > The attached patch (which the fortran@ subscribers already had a glance 
> > at) adds the FTELL, FGETC, FGET, FPUTC, FPUT, COMPLEX, AND, OR and XOR 
> > intrinsics to gfortran (they were available in g77 in category "GNU 
> > intrinsics").
> 
> +  add_sym_2 ("xor", 1, 0, BT_UNKNOWN, 0, GFC_STD_F95,
> 
> This should be GFC_STD_GNU.
> 
> BTW, do these g77 bit twiddling intrinsics (xor, and, or) do anything
> that the F95 standard ones (iand, ieor, ior) don't? If that's the
> case, perhaps we should classify them under GFC_STD_LEGACY instead?
> 

and, xor, and or can take LOGICAL arguments as well as INTEGER.
iand, ieor, and ior take only INTEGER.

      program z
      logical a, b
      a = .true.
      b = .false.
      print *, and(a,b), or(a,b), xor(a,b)
      end

troutmask:kargl[209] g77 -o z lop.f
troutmask:kargl[210] ./z
 F T T

-- 
Steve



More information about the Gcc-patches mailing list