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] PR 36947/40039: Better error messages for dummy procedures and check for OPTIONAL


Janus Weil wrote:
> 2009/5/25 Tobias Burnus <burnus@net-b.de>:
>   
>>> "If the interface of the dummy argument is explicit, the
>>>  characteristics listed in 12.2 shall be the same for the
>>>  associated actual argument and the corresponding dummy argument, ..."
>>>       
>> I think passing an actual argument with an implicit interface to
>> an explicit-interface dummy is also allowed. If the explicit
>> argument were required, the standard had written it explicitly.
>>     
>
> Attached is a new version of the patch, which retreats to the old
> behaviour in this matter. In addition I fixed a smaller bug that
> Tobias reported privately and added another test case. I also made
> sure that it still passes the testsuite without failures.
>
> Tobi's other comments I will take care of in a follow-up patch (pure,
> elemental, recursive checking etc).
>
> Ok for trunk?
>   
OK. Thanks for the patch!

> 2009-06-12  Janus Weil  <janus@gcc.gnu.org>
>
> 	PR fortran/36947
> 	PR fortran/40039
> 	* expr.c (gfc_check_pointer_assign): Call 'gfc_compare_interfaces' with
> 	error message.
> 	* gfortran.h (gfc_compare_interfaces): Additional argument.
> 	* interface.c (operator_correspondence): Removed.
> 	(gfc_compare_interfaces): Additional argument to return error message.
> 	Directly use the code from 'operator_correspondence' instead of calling
> 	the function. Check for OPTIONAL. Some rearrangements.
> 	(check_interface1): Call 'gfc_compare_interfaces' without error message.
> 	(compare_parameter): Call 'gfc_compare_interfaces' with error message.
> 	* resolve.c (check_generic_tbp_ambiguity): Call 'gfc_compare_interfaces'
> 	without error message.
>
>
> 2009-06-12  Janus Weil  <janus@gcc.gnu.org>
>
> 	PR fortran/36947
> 	PR fortran/40039
> 	* gfortran.dg/dummy_procedure_1.f90: Extended test case.
> 	* gfortran.dg/interface_20.f90: Modified error messages.
> 	* gfortran.dg/interface_21.f90: Ditto.
> 	* gfortran.dg/interface_26.f90: Ditto.
> 	* gfortran.dg/interface_27.f90: Ditto.
> 	* gfortran.dg/interface_28.f90: Extended test case.
> 	* gfortran.dg/interface_29.f90: New.
> 	* gfortran.dg/proc_decl_7.f90: Modified error messages.
> 	* gfortran.dg/proc_decl_8.f90: Ditto.
> 	* gfortran.dg/proc_ptr_11.f90: Ditto.
> 	* gfortran.dg/proc_ptr_15.f90: Ditto.
>   


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