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 fortran/35681 elemental dependencies for expressions as actual arguments.


Mikael Morin wrote:
> Ok for trunk/4.3 ?
> Thanks in advance for the review, even if late ;-)
>   
OK. Please wait a week before checking into the branch.
Thanks for the patch.

+      if (gfc_ref_needs_temporary_p (expr->ref)
+	  /* In case of elemental subroutines, there is no dependency 
+	     between two same-range array references.  */
+	  || gfc_check_dependency (var, expr, !elemental))


Can you move the comment before the if expression? Interleaved comments
make the expression less readable.

+		 We do it however, and issue a warning in case we find one. 

I'd add a comma also before "however"

Tobias

PS: Are still unreviewed patches? I did not find any, but I wouldn't
surprised if I had missed one or two.

> 2008-11-14  Mikael Morin <mikael.morin@tele2.fr>
>
> 	PR fortran/35681
> 	* gfortran.dg/elemental_dependency_1.f90: New test.
>
> 2008-11-14  Mikael Morin <mikael.morin@tele2.fr>
>
> 	PR fortran/35681
> 	* dependency.c (gfc_check_argument_var_dependency): Add
> 	elemental check flag. Issue a warning if we find a dependency
> 	but don't generate a temporary. Add the case of an elemental
> 	function call as actual argument to an elemental procedure.
> 	Add the case of an operator expression as actual argument
> 	to an elemental procedure.
> 	(gfc_check_argument_dependency): Add elemental check flag.
> 	Update calls to gfc_check_argument_var_dependency.
> 	(gfc_check_fncall_dependency): Add elemental check flag.
> 	Update call to gfc_check_argument_dependency.
> 	* trans-stmt.c (gfc_trans_call): Make call to
> 	gfc_conv_elemental_dependency unconditional, but with a flag
> 	whether we should check dependencies between variables.
> 	(gfc_conv_elemental_dependency): Add elemental check flag.
> 	Update call to gfc_check_fncall_dependency.
> 	* trans-expr.c (gfc_trans_arrayfunc_assign): Update call to
> 	gfc_check_fncall_dependency.
> 	* resolve.c (find_noncopying_intrinsics): Update call to
> 	gfc_check_fncall_dependency.
> 	* dependency.h (enum gfc_dep_check): New enum.
> 	(gfc_check_fncall_dependency): Update prototype.
>
>   


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