This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] PR40039: Procedures as actual arguments: Check intent of arguments


Janus Weil wrote:
> Regression-tested on x86_64-unknown-linux-gnu. Ok for trunk?
>   
OK. Thanks for the patch.

(At some point we should rework the interface comparing system such that
gfortran prints more useful error messages.)

Tobias

> 2009-05-14  Janus Weil  <janus@gcc.gnu.org>
>
> 	PR fortran/40039
> 	* expr.c (gfc_check_pointer_assign): Check intents when comparing
> 	interfaces.
> 	* gfortran.h (typedef struct gfc_intrinsic_arg): Add 'intent' member.
> 	(gfc_compare_interfaces): Additional argument.
> 	* interface.c (operator_correspondence): Add check for equality of
> 	intents, and new argument 'intent_check'.
> 	(gfc_compare_interfaces): New argument 'intent_check', which is passed
> 	on to operator_correspondence.
> 	(check_interface1): Don't check intents when comparing interfaces.
> 	(compare_parameter): Do check intents when comparing interfaces.
> 	* intrinsic.c (add_sym): Add intents for arguments of intrinsic
> 	procedures.
> 	(add_sym_1,add_sym_1s,add_sym_1m,add_sym_2,add_sym_2s,add_sym_3,
> 	add_sym_3ml,add_sym_3red,add_sym_3s,add_sym_4): Use INTENT_IN by
> 	default.
> 	(add_sym_1_intent,add_sym_1s_intent,add_sym_2s_intent,add_sym_3s_intent)
> 	: New functions to add intrinsic symbols, specifying custom intents.
> 	(add_sym_4s,add_sym_5s): Add new arguments to specify intents.
> 	(add_functions,add_subroutines): Add intents for various intrinsics.
> 	* resolve.c (check_generic_tbp_ambiguity): Don't check intents when
> 	comparing interfaces.
> 	* symbol.c (gfc_copy_formal_args_intr): Copy intent.
>
>
> 2009-05-14  Janus Weil  <janus@gcc.gnu.org>
>
> 	PR fortran/40039
> 	* gfortran.dg/interface_27.f90: New.
> 	* gfortran.dg/proc_ptr_11.f90: Fixing invalid test case.
> 	* gfortran.dg/proc_ptr_result_1.f90: Ditto.
>   


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]