diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2023-12-11 15:08:07 +0100 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2023-12-11 15:08:07 +0100 |
commit | 2505a8b41d3b74a545755a278f3750a29c1340b6 (patch) | |
tree | 2f6738030b69e2af926c979d369c5caded418c3f /gcc | |
parent | 8d2e5ad7f1723c9125c2d511c281b4fe62ff29cd (diff) | |
download | gcc-2505a8b41d3b74a545755a278f3750a29c1340b6.zip gcc-2505a8b41d3b74a545755a278f3750a29c1340b6.tar.gz gcc-2505a8b41d3b74a545755a278f3750a29c1340b6.tar.bz2 |
OpenMP: Minor '!$omp allocators' cleanup
gcc/fortran/ChangeLog:
* trans-openmp.cc (gfc_omp_call_add_alloc,
gfc_omp_call_is_alloc): Set 'fn spec'.
libgomp/ChangeLog:
* libgomp_g.h (GOMP_add_alloc, GOMP_is_alloc): Add.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/trans-openmp.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc index 9e166c9..9518492 100644 --- a/gcc/fortran/trans-openmp.cc +++ b/gcc/fortran/trans-openmp.cc @@ -8361,8 +8361,10 @@ gfc_omp_call_add_alloc (tree ptr) if (fn == NULL_TREE) { fn = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE); + tree att = build_tree_list (NULL_TREE, build_string (4, ". R ")); + att = tree_cons (get_identifier ("fn spec"), att, TYPE_ATTRIBUTES (fn)); + fn = build_type_attribute_variant (fn, att); fn = build_fn_decl ("GOMP_add_alloc", fn); -/* FIXME: attributes. */ } return build_call_expr_loc (input_location, fn, 1, ptr); } @@ -8380,7 +8382,9 @@ gfc_omp_call_is_alloc (tree ptr) fn = build_function_type_list (boolean_type_node, ptr_type_node, NULL_TREE); fn = build_fn_decl ("GOMP_is_alloc", fn); -/* FIXME: attributes. */ + tree att = build_tree_list (NULL_TREE, build_string (4, ". R ")); + att = tree_cons (get_identifier ("fn spec"), att, TYPE_ATTRIBUTES (fn)); + fn = build_type_attribute_variant (fn, att); } return build_call_expr_loc (input_location, fn, 1, ptr); } |