This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix optional assertion in PFTBuilder
ClosedPublic

Authored by clementval on Feb 8 2023, 7:38 AM.

Details

Summary

D142279 enabled assertion in libstdc++ and one was triggered
in the PFTBuilder because an optional was access even if it was
null.
This patch fix this issue and add a regression test.

Diff Detail

Event Timeline

clementval created this revision.Feb 8 2023, 7:38 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
clementval requested review of this revision.Feb 8 2023, 7:38 AM
jeanPerier accepted this revision.Feb 8 2023, 7:46 AM

LGTM. I think you can merge now to fix the build bot, but I would still welcome @vdonaldson feedback to asses if it is expected that targetEval.label be null in that case.

This revision is now accepted and ready to land.Feb 8 2023, 7:46 AM
This revision was landed with ongoing or failed builds.Feb 8 2023, 7:54 AM
This revision was automatically updated to reflect the committed changes.

Done. @vdonaldson Do we need a bigger fix?

This is a good permanent fix for the problem.

(The bug was introduced when the initial implementation that looked for GotoStatement's was extended to also look for CycleStmt's.)

Thanks @clementval for the fix.