summaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-08-22 10:27:46 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-08-22 10:27:46 +0000
commitf733cf303bcdc952c92b81dd62199a40a1f555ec (patch)
tree0a9a9e0f28aa7c7f5bc4d1d1d0e9647163cac4f7 /gcc/c-family
parente0e4357b88efe5dc53e50d341a09de4d02331200 (diff)
downloadgcc-tarball-f733cf303bcdc952c92b81dd62199a40a1f555ec.tar.gz
gcc-6.2.0gcc-6.2.0
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog38
-rw-r--r--gcc/c-family/c-common.h2
-rw-r--r--gcc/c-family/c-cppbuiltin.c1
-rw-r--r--gcc/c-family/c-gimplify.c12
-rw-r--r--gcc/c-family/c-omp.c35
-rw-r--r--gcc/c-family/c.opt2
6 files changed, 79 insertions, 11 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 20f75b654d..328cfa9ac4 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,41 @@
+2016-08-22 Release Manager
+
+ * GCC 6.2.0 released.
+
+2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ PR c++/71214
+ * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
+
+2016-06-14 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2016-06-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/68657
+ * c.opt (Wpsabi): Add Warning flag.
+
+2016-06-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/71498
+ * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
+ all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
+
+2016-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/71349
+ * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
+ C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
+ C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
+ instead of C_OMP_CLAUSE_SPLIT_FOR.
+
+2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
+
+ PR middle-end/70626
+ * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
+ * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
+ reduction clauses in acc parallel loops.
+
2016-04-27 Release Manager
* GCC 6.1.0 released.
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index fa3746c372..dd74d0dd62 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -1276,7 +1276,7 @@ extern bool c_omp_check_loop_iv (tree, tree, walk_tree_lh);
extern bool c_omp_check_loop_iv_exprs (location_t, tree, tree, tree, tree,
walk_tree_lh);
extern tree c_finish_oacc_wait (location_t, tree, tree);
-extern tree c_oacc_split_loop_clauses (tree, tree *);
+extern tree c_oacc_split_loop_clauses (tree, tree *, bool);
extern void c_omp_split_clauses (location_t, enum tree_code, omp_clause_mask,
tree, tree *);
extern tree c_omp_declare_simd_clauses_to_numbers (tree, tree);
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index 408ad4747a..3d4587e6db 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -848,6 +848,7 @@ c_cpp_builtins (cpp_reader *pfile)
cpp_define (pfile, "__cpp_decltype=200707");
cpp_define (pfile, "__cpp_attributes=200809");
cpp_define (pfile, "__cpp_rvalue_reference=200610");
+ cpp_define (pfile, "__cpp_rvalue_references=200610");
cpp_define (pfile, "__cpp_variadic_templates=200704");
cpp_define (pfile, "__cpp_initializer_lists=200806");
cpp_define (pfile, "__cpp_delegating_constructors=200604");
diff --git a/gcc/c-family/c-gimplify.c b/gcc/c-family/c-gimplify.c
index 0757193bee..c18b057727 100644
--- a/gcc/c-family/c-gimplify.c
+++ b/gcc/c-family/c-gimplify.c
@@ -67,23 +67,23 @@ ubsan_walk_array_refs_r (tree *tp, int *walk_subtrees, void *data)
{
hash_set<tree> *pset = (hash_set<tree> *) data;
- /* Since walk_tree doesn't call the callback function on the decls
- in BIND_EXPR_VARS, we have to walk them manually. */
if (TREE_CODE (*tp) == BIND_EXPR)
{
+ /* Since walk_tree doesn't call the callback function on the decls
+ in BIND_EXPR_VARS, we have to walk them manually, so we can avoid
+ instrumenting DECL_INITIAL of TREE_STATIC vars. */
+ *walk_subtrees = 0;
for (tree decl = BIND_EXPR_VARS (*tp); decl; decl = DECL_CHAIN (decl))
{
if (TREE_STATIC (decl))
- {
- *walk_subtrees = 0;
- continue;
- }
+ continue;
walk_tree (&DECL_INITIAL (decl), ubsan_walk_array_refs_r, pset,
pset);
walk_tree (&DECL_SIZE (decl), ubsan_walk_array_refs_r, pset, pset);
walk_tree (&DECL_SIZE_UNIT (decl), ubsan_walk_array_refs_r, pset,
pset);
}
+ walk_tree (&BIND_EXPR_BODY (*tp), ubsan_walk_array_refs_r, pset, pset);
}
else if (TREE_CODE (*tp) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (*tp, 0)) == ARRAY_REF)
diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c
index 5469d0d562..1691c40f11 100644
--- a/gcc/c-family/c-omp.c
+++ b/gcc/c-family/c-omp.c
@@ -861,9 +861,10 @@ c_omp_check_loop_iv_exprs (location_t stmt_loc, tree declv, tree decl,
#pragma acc parallel loop */
tree
-c_oacc_split_loop_clauses (tree clauses, tree *not_loop_clauses)
+c_oacc_split_loop_clauses (tree clauses, tree *not_loop_clauses,
+ bool is_parallel)
{
- tree next, loop_clauses;
+ tree next, loop_clauses, nc;
loop_clauses = *not_loop_clauses = NULL_TREE;
for (; clauses ; clauses = next)
@@ -882,7 +883,23 @@ c_oacc_split_loop_clauses (tree clauses, tree *not_loop_clauses)
case OMP_CLAUSE_SEQ:
case OMP_CLAUSE_INDEPENDENT:
case OMP_CLAUSE_PRIVATE:
+ OMP_CLAUSE_CHAIN (clauses) = loop_clauses;
+ loop_clauses = clauses;
+ break;
+
+ /* Reductions must be duplicated on both constructs. */
case OMP_CLAUSE_REDUCTION:
+ if (is_parallel)
+ {
+ nc = build_omp_clause (OMP_CLAUSE_LOCATION (clauses),
+ OMP_CLAUSE_REDUCTION);
+ OMP_CLAUSE_DECL (nc) = OMP_CLAUSE_DECL (clauses);
+ OMP_CLAUSE_REDUCTION_CODE (nc)
+ = OMP_CLAUSE_REDUCTION_CODE (clauses);
+ OMP_CLAUSE_CHAIN (nc) = *not_loop_clauses;
+ *not_loop_clauses = nc;
+ }
+
OMP_CLAUSE_CHAIN (clauses) = loop_clauses;
loop_clauses = clauses;
break;
@@ -966,6 +983,7 @@ c_omp_split_clauses (location_t loc, enum tree_code code,
case OMP_CLAUSE_MAP:
case OMP_CLAUSE_IS_DEVICE_PTR:
case OMP_CLAUSE_DEFAULTMAP:
+ case OMP_CLAUSE_DEPEND:
s = C_OMP_CLAUSE_SPLIT_TARGET;
break;
case OMP_CLAUSE_NUM_TEAMS:
@@ -981,7 +999,6 @@ c_omp_split_clauses (location_t loc, enum tree_code code,
s = C_OMP_CLAUSE_SPLIT_PARALLEL;
break;
case OMP_CLAUSE_ORDERED:
- case OMP_CLAUSE_NOWAIT:
s = C_OMP_CLAUSE_SPLIT_FOR;
break;
case OMP_CLAUSE_SCHEDULE:
@@ -1316,6 +1333,18 @@ c_omp_split_clauses (location_t loc, enum tree_code code,
else
s = C_OMP_CLAUSE_SPLIT_FOR;
break;
+ case OMP_CLAUSE_NOWAIT:
+ /* Nowait clause is allowed on target, for and sections, but
+ is not allowed on parallel for or parallel sections. Therefore,
+ put it on target construct if present, because that can only
+ be combined with parallel for{, simd} and not with for{, simd},
+ otherwise to the worksharing construct. */
+ if ((mask & (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_MAP))
+ != 0)
+ s = C_OMP_CLAUSE_SPLIT_TARGET;
+ else
+ s = C_OMP_CLAUSE_SPLIT_FOR;
+ break;
default:
gcc_unreachable ();
}
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 4f86876c53..88038a076f 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -265,7 +265,7 @@ C++ ObjC++ Var(warn_abi_tag) Warning
Warn if a subobject has an abi_tag attribute that the complete object type does not have.
Wpsabi
-C ObjC C++ ObjC++ LTO Var(warn_psabi) Init(1) Undocumented LangEnabledBy(C ObjC C++ ObjC++,Wabi)
+C ObjC C++ ObjC++ LTO Var(warn_psabi) Init(1) Warning Undocumented LangEnabledBy(C ObjC C++ ObjC++,Wabi)
Waddress
C ObjC C++ ObjC++ Var(warn_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)