aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-08-18 15:35:14 +0200
committerMartin Liska <mliska@suse.cz>2022-08-18 15:35:14 +0200
commitc4cf402822be5b52516a727e6b2abc923d1a9d52 (patch)
treed97b4c3407d27282cc3bcfda5a0052d37a325580 /gcc/c
parent87e8197e4012801477e3743601d6d6ead64e851c (diff)
parent03119249b9cfedb48e910b8df6a832b206cced2b (diff)
downloadgcc-c4cf402822be5b52516a727e6b2abc923d1a9d52.zip
gcc-c4cf402822be5b52516a727e6b2abc923d1a9d52.tar.gz
gcc-c4cf402822be5b52516a727e6b2abc923d1a9d52.tar.bz2
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog8
-rw-r--r--gcc/c/c-decl.cc5
-rw-r--r--gcc/c/c-typeck.cc8
3 files changed, 14 insertions, 7 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 985c96c..a57d62f 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,11 @@
+2022-08-17 Tobias Burnus <tobias@codesourcery.com>
+ Chung-Lin Tang <cltang@codesourcery.com>
+
+ PR c++/104493
+ * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
+ instead of removed langhook.
+ * c-typeck.cc (c_finish_omp_clauses): Likewise.
+
2022-08-11 Marek Polacek <polacek@redhat.com>
PR middle-end/102633
diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc
index ae8990c..9e590c6 100644
--- a/gcc/c/c-decl.cc
+++ b/gcc/c/c-decl.cc
@@ -5074,8 +5074,7 @@ c_decl_attributes (tree *node, tree attributes, int flags)
&& ((VAR_P (*node) && is_global_var (*node))
|| TREE_CODE (*node) == FUNCTION_DECL))
{
- if (VAR_P (*node)
- && !lang_hooks.types.omp_mappable_type (TREE_TYPE (*node)))
+ if (VAR_P (*node) && !omp_mappable_type (TREE_TYPE (*node)))
attributes = tree_cons (get_identifier ("omp declare target implicit"),
NULL_TREE, attributes);
else
@@ -5701,7 +5700,7 @@ finish_decl (tree decl, location_t init_loc, tree init,
DECL_ATTRIBUTES (decl)
= remove_attribute ("omp declare target implicit",
DECL_ATTRIBUTES (decl));
- if (!lang_hooks.types.omp_mappable_type (TREE_TYPE (decl)))
+ if (!omp_mappable_type (TREE_TYPE (decl)))
error ("%q+D in declare target directive does not have mappable type",
decl);
else if (!lookup_attribute ("omp declare target",
diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc
index d37de2a..de8780a 100644
--- a/gcc/c/c-typeck.cc
+++ b/gcc/c/c-typeck.cc
@@ -14955,7 +14955,7 @@ c_finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
else
{
t = OMP_CLAUSE_DECL (c);
- if (!lang_hooks.types.omp_mappable_type (TREE_TYPE (t)))
+ if (!omp_mappable_type (TREE_TYPE (t)))
{
error_at (OMP_CLAUSE_LOCATION (c),
"array section does not have mappable type "
@@ -15092,7 +15092,7 @@ c_finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
t, omp_clause_code_name[OMP_CLAUSE_CODE (c)]);
remove = true;
}
- else if (!lang_hooks.types.omp_mappable_type (TREE_TYPE (t)))
+ else if (!omp_mappable_type (TREE_TYPE (t)))
{
error_at (OMP_CLAUSE_LOCATION (c),
"%qE does not have a mappable type in %qs clause",
@@ -15173,7 +15173,7 @@ c_finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
|| (OMP_CLAUSE_MAP_KIND (c)
== GOMP_MAP_FORCE_DEVICEPTR)))
&& t == OMP_CLAUSE_DECL (c)
- && !lang_hooks.types.omp_mappable_type (TREE_TYPE (t)))
+ && !omp_mappable_type (TREE_TYPE (t)))
{
error_at (OMP_CLAUSE_LOCATION (c),
"%qD does not have a mappable type in %qs clause", t,
@@ -15290,7 +15290,7 @@ c_finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
cname);
remove = true;
}
- else if (!lang_hooks.types.omp_mappable_type (TREE_TYPE (t)))
+ else if (!omp_mappable_type (TREE_TYPE (t)))
{
error_at (OMP_CLAUSE_LOCATION (c),
"%qD does not have a mappable type in %qs clause", t,