aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-07-08 22:29:26 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2015-07-08 22:29:26 +0200
commitb03b462f1ffdef448aa666d8079cd047bcddee77 (patch)
treec4559f09b52e8af65fdf825d118170fc012ae9c9 /gcc/cp
parent7b841a1252c610d817f1ea0fba140834e5443e7f (diff)
downloadgcc-b03b462f1ffdef448aa666d8079cd047bcddee77.zip
gcc-b03b462f1ffdef448aa666d8079cd047bcddee77.tar.gz
gcc-b03b462f1ffdef448aa666d8079cd047bcddee77.tar.bz2
c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses are to be removed, return NULL rather than original clauses list.
* c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses are to be removed, return NULL rather than original clauses list. * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp. * pt.c (apply_late_template_attributes): Likewise. * g++.dg/vect/vect.exp: Run also simd* tests. * gcc.dg/vect/tree-vect.h (abort, exit): For C++ use extern "C". (check_vect): Fix up get_cpuid call for C++. * g++.dg/vect/simd-clone-1.cc: New test. From-SVN: r225583
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/cp/pt.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e469156..74b746a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-08 Jakub Jelinek <jakub@redhat.com>
+
+ * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
+ * pt.c (apply_late_template_attributes): Likewise.
+
2015-07-08 Marek Polacek <polacek@redhat.com>
PR c++/66748
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index b70a2cc..db8b1aa 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -7910,7 +7910,7 @@ grokfndecl (tree ctype,
if (TYPE_NOTHROW_P (type) || nothrow_libfn_p (decl))
TREE_NOTHROW (decl) = 1;
- if (flag_openmp || flag_cilkplus)
+ if (flag_openmp || flag_openmp_simd || flag_cilkplus)
{
/* Adjust "omp declare simd" attributes. */
tree ods = lookup_attribute ("omp declare simd", *attrlist);
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 2f336ed..d3e9d31 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -9071,7 +9071,7 @@ apply_late_template_attributes (tree *decl_p, tree attributes, int attr_flags,
{
*p = TREE_CHAIN (t);
TREE_CHAIN (t) = NULL_TREE;
- if ((flag_openmp || flag_cilkplus)
+ if ((flag_openmp || flag_openmp_simd || flag_cilkplus)
&& is_attribute_p ("omp declare simd",
get_attribute_name (t))
&& TREE_VALUE (t))