This is an archive of the discontinued LLVM Phabricator instance.

[flang] Relax two !DIR$ IGNORE_TKR error cases with descriptor arguments
ClosedPublic

Authored by klausler on Apr 20 2023, 12:13 PM.

Details

Summary

Allow two currently erroneous cases of !DIR$ IGNORE_TKR errors: allocatable
and pointers, and IGNORE_TKR(R) on (other) arguments passed via descriptors.
Downgrade these cases to warnings when they appear in external interfaces,
since their implementations may well be in C. But retain the error status
on these cases for module procedures, since the Fortran implementation
probably can't work.

Diff Detail

Event Timeline

klausler created this revision.Apr 20 2023, 12:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2023, 12:13 PM
klausler requested review of this revision.Apr 20 2023, 12:13 PM
flang/test/Semantics/ignore_tkr01.f90
144

Would you mind adding a test for assumed-shape in addition to assumed-rank? It should also be a warning.

Independent of whether you use arc of the web interface with e.g. git diff -U999999 u > mypatch.patch you could add context to your diff:
https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface
which will be really appreciated by your reviewers.

klausler updated this revision to Diff 515438.Apr 20 2023, 12:45 PM

Add requested test, and a better warning for IGNORE_TKR(R) on assumed-rank

razvanlupusoru added inline comments.Apr 20 2023, 1:04 PM
flang/lib/Semantics/check-declarations.cpp
739

The test below is not checking for this error - but for the other error.

739

Never mind. I missed it.

razvanlupusoru accepted this revision.Apr 20 2023, 1:06 PM

Thank you.

This revision is now accepted and ready to land.Apr 20 2023, 1:06 PM