[PATCH 1/7] fortran: new abstract class gfc_dummy_arg

Mikael Morin mikael@gcc.gnu.org
Tue Aug 3 15:39:39 GMT 2021

Introduce a new abstract class gfc_dummy_arg that provides a common
interface to both dummy arguments of user-defined procedures (which
have type gfc_formal_arglist) and dummy arguments of intrinsic procedures
(which have type gfc_intrinsic_arg).

	* gfortran.h (gfc_dummy_arg): New.
	(gfc_formal_arglist, gfc_intrinsic_arg): Inherit gfc_dummy_arg.
	(gfc_get_formal_arglist, gfc_get_intrinsic_arg): Call constructor.
	* intrinsic.c (gfc_intrinsic_init_1): Merge the memory area of
	conversion intrinsics with that of regular function and
	subroutine intrinsics.
	Use a separate memory area for arguments.
	(add_sym, gfc_intrinsic_init_1): Don’t do pointer arithmetics
	with next_arg.
	(add_sym, make_alias, add_conv,
	add_char_conversions, gfc_intrinsic_init_1): Call constructor
	before filling object data.
	* resolve.c (resolve_select_type): Same.
 gcc/fortran/gfortran.h  | 22 ++++++++++++++-------
 gcc/fortran/intrinsic.c | 44 ++++++++++++++++++++++-------------------
 gcc/fortran/resolve.c   | 10 ++++++----
 3 files changed, 45 insertions(+), 31 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fortran-new-abstract-class-gfc_dummy_arg.patch
Type: text/x-patch
Size: 6343 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210803/69bd2dc5/attachment-0001.bin>

More information about the Gcc-patches mailing list