This is an archive of the discontinued LLVM Phabricator instance.

[flang] Catch calls to assumed-length character functions
ClosedPublic

Authored by klausler on May 21 2022, 10:14 PM.

Details

Summary

Semantics was allowing calls to CHARACTER(*) functions, which are odd
things -- they can be declared, and passed around, but can never actually
be called as such. They must be redeclared with an explicit length that
ends up being passed as a hidden argument. So check for these calls
and diagnose them, add tests, and clean up some existing tests that
were in error.

Possible TODO for lowering: there were some test cases that used
bad calls to assumed-length CHARACTER*(*) functions and validated
their implementations. I've removed some, and adjusted another,
but the code that somehow implemented these calls may need to be
removed and replaced with an assert about bad semantics.

Diff Detail

Event Timeline

klausler created this revision.May 21 2022, 10:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2022, 10:14 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.May 21 2022, 10:14 PM
vdonaldson accepted this revision.May 23 2022, 10:28 AM
This revision is now accepted and ready to land.May 23 2022, 10:28 AM
klausler updated this revision to Diff 431766.May 24 2022, 12:55 PM

Delete part of a new test that showed up during review and testing.