From ec35ea455c30c14700dbb7a2cbbd3379e0212e96 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 6 Apr 2016 14:42:24 +0200 Subject: re PR middle-end/70550 (-Wuninitialized false positives in OpenMP code) PR middle-end/70550 * tree.h (OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT): Define. * gimplify.c (gimplify_adjust_omp_clauses_1): Set it for implicit firstprivate clauses. * omp-low.c (lower_send_clauses): Set TREE_NO_WARNING for OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT !by_ref vars in task contexts. (lower_omp_target): Set TREE_NO_WARNING for non-addressable possibly uninitialized vars which are copied into addressable temporaries or copied for GOMP_MAP_FIRSTPRIVATE_INT. * c-c++-common/gomp/pr70550-1.c: New test. * c-c++-common/gomp/pr70550-2.c: New test. From-SVN: r234779 --- gcc/tree.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 544a6a1..fa70596 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1430,6 +1430,10 @@ extern void protected_set_expr_location (tree, location_t); #define OMP_CLAUSE_PRIVATE_TASKLOOP_IV(NODE) \ TREE_PROTECTED (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_PRIVATE)) +/* True on a FIRSTPRIVATE clause if it has been added implicitly. */ +#define OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT(NODE) \ + (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_FIRSTPRIVATE)->base.public_flag) + /* True on a LASTPRIVATE clause if a FIRSTPRIVATE clause for the same decl is present in the chain. */ #define OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE(NODE) \ -- cgit v1.1