This is an archive of the discontinued LLVM Phabricator instance.

[flang] Correct interaction between generics and intrinsics
ClosedPublic

Authored by klausler on Apr 13 2022, 12:40 PM.

Details

Summary

Fortran allows a generic interface to have he same name as an
intrinsic procedure. If the intrinsic is explicitly marked with
the INTRINSIC attribute, restrictions apply (C848) - the generic
must contain only functions or subroutines, depending on the
intrinsic. Explicit or not, the generic overrides the intrinsic,
but the intrinsic behavior must still be available for calls
whose actual arguments do not match any of the specific procedures.

Semantics was not checking constraint C848, and it didn't allow
an explicit INTRINSIC attribute on a name of a generic interface.

Diff Detail

Event Timeline

klausler created this revision.Apr 13 2022, 12:40 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Apr 13 2022, 12:40 PM
This revision is now accepted and ready to land.Apr 14 2022, 2:25 AM