This is an archive of the discontinued LLVM Phabricator instance.

[flang] Add some semantic checks for derived type with BIND attribute
ClosedPublic

Authored by peixin on Jul 24 2022, 4:27 AM.

Details

Summary

This supports checks in C1801-C1805 for derived type with BIND attribute.
The other compilers such as 'gfortran' and 'ifort' do not report error
for C1802 and C1805, so emit warnings for them.

Diff Detail

Event Timeline

peixin created this revision.Jul 24 2022, 4:27 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: jdoerfert. · View Herald Transcript
peixin requested review of this revision.Jul 24 2022, 4:27 AM
klausler added inline comments.Jul 25 2022, 10:44 AM
flang/lib/Semantics/check-declarations.cpp
1920

derived*

1924

derived*

s/from another/another/

1931

derived*

1939

derived*

This should be an error.

1943

derived*

This should probably be a portability warning.

peixin updated this revision to Diff 447644.Jul 26 2022, 4:34 AM

Thanks @klausler for the review. Addressed the comments.

klausler accepted this revision.Aug 1 2022, 8:20 AM
This revision is now accepted and ready to land.Aug 1 2022, 8:20 AM