This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix crash from a blank BIND(C,NAME="") on subprogram
ClosedPublic

Authored by klausler on May 25 2022, 1:38 PM.

Details

Summary

A recent change fixed the processing of BIND(C,NAME=expr) character
expressions so that they are evaluated as constants in the scope of
the subprogram. However, when the character name expression results
in an empty value after trimming, the compiler emits a warning message,
and this message is now causing a crash due to a lack of statement
context. To fix, extend the deferred processing of the BIND(C,NAME="")
so that a basic statement context exists.

Diff Detail

Event Timeline

klausler created this revision.May 25 2022, 1:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 1:38 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.May 25 2022, 1:38 PM
vdonaldson accepted this revision.May 25 2022, 2:44 PM
This revision is now accepted and ready to land.May 25 2022, 2:44 PM