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, OOP] PR 49638: [OOP] length parameter is ignored when overriding type bound character functions with constant length.


On Sunday 07 August 2011 00:21:46 Janus Weil wrote:
> Well, ok. After this amount of discussion, how about we start with the
> easy things: Here is a preparational patch (basically a subset of the
> previous one), which does not do any real changes yet, only some
> preparation and cleanup:
> * It moves check_typebound_override to interface.c and prefixes it
> with gfc_ (I don't like moving and modifying it at the same time).
> * It add the commutativity of multiplication in gfc_dep_compare_expr.
> * It does some minor cleanup in dependency.c (making two routines
> static and removing an unused argument).
> 
> Ok for trunk?
> 
> Cheers,
> Janus
> 
> 
> 2011-08-06  Janus Weil  <janus@gcc.gnu.org>
> 
> 	PR fortran/49638
> 	* dependency.h (gfc_is_same_range,gfc_are_identical_variables): Remove
> 	two prototypes.
> 	* dependency.c (gfc_are_identical_variables): Made static and renamed.
I think both the old and the new name should appear. 
Usually I use (old, new): Rename the former to the latter

> 	(gfc_dep_compare_expr): Renamed 'gfc_are_identical_variables', handle
> 	commutativity of multiplication.
> 	(gfc_is_same_range): Made static and renamed, removed argument 'def'.
Same here.

> 	(check_section_vs_section): Renamed 'gfc_is_same_range'.
> 	* gfortran.h (gfc_check_typebound_override): New prototype.
> 	* interface.c (gfc_check_typebound_override): Moved here from ...
> 	* resolv.c (check_typebound_override): ... here (and renamed).
> 	(resolve_typebound_procedure): Renamed 'check_typebound_override'.

Index: gcc/fortran/dependency.h
===================================================================
--- gcc/fortran/dependency.h    (revision 177528)
+++ gcc/fortran/dependency.h    (working copy)
@@ -37,11 +37,8 @@ gfc_expr *gfc_get_noncopying_intrinsic_argument (g
 int gfc_check_fncall_dependency (gfc_expr *, sym_intent, gfc_symbol *,
                                 gfc_actual_arglist *, gfc_dep_check);
 int gfc_check_dependency (gfc_expr *, gfc_expr *, bool);
-int gfc_is_same_range (gfc_array_ref *, gfc_array_ref *, int, int);
+/*int gfc_is_same_range (gfc_array_ref *, gfc_array_ref *, int, bool);*/
 int gfc_expr_is_one (gfc_expr *, int);
 identical_variables (gfc_expr *, gfc_expr *);

I would just remove it together with the commented code in trans-array.c.
Nobody is likely to use it soon, and it remains available through svn if 
needed.

Otherwise OK.
Please give Thomas (or others) some time to comment before commiting.

Mikael


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