[patch, fortran] RFC: Renaming 'enum gfc_generic_isym_id'
Janne Blomqvist
blomqvist.janne@gmail.com
Tue May 29 20:18:00 GMT 2007
Daniel Franke wrote:
> See also:
> http://gcc.gnu.org/ml/fortran/2007-05/msg00443.html
>
>>>> (1) rename 'enum gfc_generic_isym_id' to 'enum> gfc_isym_id'
>>>> (2) add missing intrinsics to 'enum gfc_isym_id'
>>>> (3) add an additional 'id' argument to 'add_sym_[012345][s]'
>>>> (4) change all callers, add the corresponding 'gfc_isym_id'
>>>> (5) rename member 'generic_id' in 'struct gfc_intrinsic_sym' to 'id'
>>>> (6) change all callers
>
>> I'll go ahead and prepare a patch following the outline given above. A
>> patch tells more than vague descriptions.
>
>
> With attached patch, any intrinsic---functions and subroutines alike---becomes
> easily identifyable by its isym->id (modulo specific names as ABS and ZABS).
>
> Currently all subroutine calls, including intrinsic subroutines, are
> translated via gfc_trans_call(). There are two reasons to splice off the
> translation of intrinsic subroutines from gfc_trans_call():
>
> (a) manually translate subroutines with INTENT(out) arguments to ...
> (b) cast the input/output before/after the corresponding library call
> to get rid of duplicate implementations with different types.
>
> For this, I have a patch in-the-works that fixes wrong-code PR29651, but it
> lacks the framework to identify the intrinsic called. The resolved_symbol
> in 'code' does not help and up until now isym->generic_id equals
> GFC_ISYM_NONE. With attached patch in place identifying the subroutine can be
> done similar to gfc_conv_intrinsic_function().
>
> Regtested on i686-pc-linux-gnu. Ok for trunk?
>
>
> 2007-05-28 Daniel Franke <franke.daniel@gmail.com>
>
> * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
> added missing GFC_ISYM_* enumators, ordered alphabetically.
> (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
> (gfc_find_subroutine): Newly exposed.
> * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all
> callers.
> (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
> * dependency.c: Changed usage of isym->generic_id to isym->id.
> * openmp.c: Likewise.
> * resolve.c: Likewise.
> * trans-array.c: Likewise.
> * trans-expr.c: Likewise.
> * trans-intrinsic.c: Likewise.
> * trans-openmp.c: Likewise.
>
> The patch is quite technical and does not bear any surprises besides its
> size :)
Ok for trunk.
--
Janne Blomqvist
More information about the Fortran
mailing list