On Tue, Oct 01, 2019 at 04:19:11PM +0200, Tobias Burnus wrote:
> OK for the trunk?

Ok, with a small formatting nit below.

> --- a/gcc/fortran/trans-openmp.c
> +++ b/gcc/fortran/trans-openmp.c
> @@ -47,6 +47,15 @@ along with GCC; see the file COPYING3.  If not see
>  
>  int ompws_flags;
>  
> +/* True if OpenMP should treat this DECL as an optional argument.  */
> +
> +bool
> +gfc_omp_is_optional_argument (const_tree decl)
> +{
> +  return (TREE_CODE (decl) == PARM_DECL && DECL_LANG_SPECIFIC (decl)
> +       && GFC_DECL_OPTIONAL_ARGUMENT (decl));
> +}

I think our coding style is that if the whole && or || condition fits
on one line, it goes on one line, if it doesn't fit, each && or ||
subexpression goes on a separate line, so no mixing of 2 subexpressions on
this line, 3 on following line, 1 on another one.  So the above should be
  return (TREE_CODE (decl) == PARM_DECL
          && DECL_LANG_SPECIFIC (decl)
          && GFC_DECL_OPTIONAL_ARGUMENT (decl));

And, as I said earlier, more work will be needed on the OpenMP side to handle
optional arguments e.g. in data sharing clauses properly.

        Jakub

Reply via email to