[Patch][GCC12] Fortran/OpenMP: Add 'omp depobj' and 'depend(mutexinoutset:'

Tobias Burnus tobias@codesourcery.com
Tue Apr 20 21:15:54 GMT 2021


I have now updated the patch – and intent to commit it tomorrow, unless
there are further comments.

On 17.03.21 19:29, Jakub Jelinek wrote:
> On Wed, Mar 17, 2021 at 07:19:29PM +0100, Tobias Burnus wrote:
>> @@ -1831,6 +1852,7 @@ show_omp_node (int level, gfc_code *c)
>> +    case EXEC_OMP_DEPOBJ: name = "DEPBOBJ"; break;
> s/DEPBOBJ/DEPOBJ/
>> +      || omp_clauses->depobj->ts.kind != 2*gfc_index_integer_kind
> Formatting (several times), I think we should use 2 * gfc_index_integer_kind
Fixed.
>> @@ -2545,6 +2545,8 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
>> +              if (POINTER_TYPE_P (TREE_TYPE (decl)))
>> +                decl = build_fold_indirect_ref (decl);
> I'm a little bit worried about this, are you sure it won't affect anything
> but depobj?
I have added an 'n->u.depend_op == OMP_DEPEND_DEPOBJ' to be sure.
>> +      case OMP_DEPEND_MUTEXINOUTSET: k = GOMP_DEPEND_MUTEXINOUTSET; break;
>> +      case OMP_DEPEND_DEPOBJ: k = GOMP_DEPEND_MUTEXINOUTSET; break;
> Can depobj_update be OMP_DEPEND_DEPOBJ ?

'update' can't but 'depend' can – but only in OpenMP 5.1; moved
testcase, fixed check & remove 'case ...DEPOBJ:' line for now.

> Otherwise LGTM.

Attached is the full patch.

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: omp-depobj-v2.diff
Type: text/x-patch
Size: 27235 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210420/5145cc3a/attachment-0001.bin>


More information about the Gcc-patches mailing list