Re: [patch, fortran] Improve dependency checking

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [patch, fortran] Improve dependency checking

Steve Kargl
On Thu, Jul 25, 2019 at 02:57:35PM +0200, Thomas Koenig wrote:

> Index: dependency.h
> ===================================================================
> --- dependency.h (Revision 273733)
> +++ dependency.h (Arbeitskopie)
> @@ -37,7 +37,7 @@ int gfc_check_fncall_dependency (gfc_expr *, sym_i
>  int gfc_check_dependency (gfc_expr *, gfc_expr *, bool);
>  int gfc_expr_is_one (gfc_expr *, int);
>  
> -int gfc_dep_resolver(gfc_ref *, gfc_ref *, gfc_reverse *);
> +int gfc_dep_resolver(gfc_ref *, gfc_ref *, gfc_reverse *, bool identical = false);

This is changing the prototype.  I would expect to see


int gfc_dep_resolver(gfc_ref *, gfc_ref *, gfc_reverse *, bool);


--
Steve
Reply | Threaded
Open this post in threaded view
|

Re: [patch, fortran] Improve dependency checking

Thomas Koenig-6
Hi Steve,

>> -int gfc_dep_resolver(gfc_ref *, gfc_ref *, gfc_reverse *);
>> +int gfc_dep_resolver(gfc_ref *, gfc_ref *, gfc_reverse *, bool identical = false);
> This is changing the prototype.  I would expect to see
>
>
> int gfc_dep_resolver(gfc_ref *, gfc_ref *, gfc_reverse *, bool);

Usig C++'s optional arguments is actually quite useful, it's used
already used in a few places in the front end.

The idea is that you don't need to touch the other callers, just the
ones where the new argument matters.

However, in this particular case, it would also be possible to ajust
all other callers (exactly one), if you prefer.

Regards

        Thomas