This is an archive of the discontinued LLVM Phabricator instance.

[flang][RFC] Change the interface for non-BIND(C) CPTR type with VALUE attribute
ClosedPublic

Authored by peixin on Nov 2 2022, 3:23 AM.

Details

Summary

When the type(c_ptr/c_funptr) argument has value attribute in non-BIND(C)
procedure, it is passed by VALUE in gfortran. ifort does not do this. Be
consistent with gfortran.

Fix #58756.

Diff Detail

Event Timeline

peixin created this revision.Nov 2 2022, 3:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2022, 3:23 AM
peixin requested review of this revision.Nov 2 2022, 3:23 AM

Thanks, @peixin. I have verified that this builds and tests correctly and, in combination with the fix in https://reviews.llvm.org/D137237, fixes the problem that I reported in #58739.

@jeanPerier , can you please verify that the changes to the generated FIR look correct?

This revision is now accepted and ready to land.Nov 3 2022, 2:41 AM