On 01/13/16 17:44, Jakub Jelinek wrote:
On Wed, Jan 13, 2016 at 11:35:08PM +0100, Marek Polacek wrote:
On Wed, Jan 13, 2016 at 02:29:21PM -0800, Cesar Philippidis wrote:
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -5994,6 +5994,11 @@ oacc_default_clause (struct gimplify_omp_ctx *ctx, tree
decl, unsigned flags)
{
const char *rkind;
bool on_device = false;
+ tree type = TREE_TYPE (decl);
+
+ if (TREE_CODE (type) == REFERENCE_TYPE
+ || POINTER_TYPE_P (type))
I think this should be just POINTER_TYPE_P--this macro checks for
REFERENCE_TYPE as well.
Unless the spec says that for all pointers you should consider what it
points to, this really looks weird to me.
I think the spec is silent. I remember looking at this before and thinking
looking through pointers was strange. IMHO it should behave in a manner as
similar as possible to OpenMP (which I presume is precise about whether one
should look through arbitrary pointer types).
Is this a case of the Fortran FE OpenACC bits not annotating some artificial
object correctly?
nathan