This is an archive of the discontinued LLVM Phabricator instance.

[flang] Handle CALL C_F_POINTER(without SHAPE=)
ClosedPublic

Authored by klausler on Feb 15 2022, 8:22 AM.

Details

Summary

Calls to C_F_POINTER() without the optional SHAPE= third argument
were failing to be recognized as proper calls to the intrinsic,
but the failure was not generating any error message. This led to
a crash in lowering, which rightfully expects a typed expression
to be associated with the call.

So (1) catch silent failures to convert CALL statements as internal
errors, as is done for expressions and assignment statements; and
(2) clean up C_F_POINTER intrinsic handling to cope with only two
arguments and to emit an error for a FPTR= argument with no type.

Diff Detail

Event Timeline

klausler created this revision.Feb 15 2022, 8:22 AM
klausler requested review of this revision.Feb 15 2022, 8:22 AM
vdonaldson accepted this revision.Feb 15 2022, 9:44 AM
This revision is now accepted and ready to land.Feb 15 2022, 9:44 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 15 2022, 10:58 AM