[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-fortran
Subject: Re: [PATCH 2/5, OpenACC] Support Fortran optional arguments in the firstprivate clause
From: Jakub Jelinek <jakub () redhat ! com>
Date: 2019-07-31 12:48:12
Message-ID: 20190731124812.GA15878 () tucnak
[Download RAW message or body]
On Mon, Jul 29, 2019 at 09:55:52PM +0100, Kwok Cheung Yeung wrote:
> +/* True if OpenMP should treat this DECL as an optional argument. */
> +
> +bool
> +gfc_omp_is_optional_argument (const_tree decl)
> +{
> + return DECL_LANG_SPECIFIC (decl)
> + && GFC_DECL_OPTIONAL_ARGUMENT (decl);
I think this ought to be written as:
return (DECL_LANG_SPECIFIC (decl)
&& GFC_DECL_OPTIONAL_ARGUMENT (decl));
because otherwise for emacs users (not me) emacs mishandles it.
Also, I wonder if it shouldn't start with TREE_CODE (decl) == PARM_DECL
check, anything else isn't a dummy argument and so can't be optional.
> +}
> +
> /* True if OpenMP should privatize what this DECL points to rather
> than the DECL itself. */
>
Otherwise LGTM.
Jakub
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic