This is an archive of the discontinued LLVM Phabricator instance.

[flang] Avoid segfault when defining op is not a fir::Convert
ClosedPublic

Authored by clementval on Jul 4 2022, 6:36 AM.

Details

Summary

The previous code made the assumption that the defining
operation is a fir::ConvertOp without checking. This results in
segmentation fault in code like the added test.

Diff Detail

Event Timeline

clementval created this revision.Jul 4 2022, 6:36 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 4 2022, 6:36 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Jul 4 2022, 6:36 AM
This revision is now accepted and ready to land.Jul 4 2022, 6:37 AM