This is an archive of the discontinued LLVM Phabricator instance.

[flang] Avoid crash in statement function error case
ClosedPublic

Authored by klausler on Jun 22 2023, 9:27 AM.

Details

Summary

The predicate IsPureProcedure() crashes with infinite
recursion when presented with mutually recursive statement
functions -- an error case that should be recoverable.
Fix by adding a visited set.

Fixes bug https://github.com/llvm/llvm-project/issues/63231

Diff Detail

Event Timeline

klausler created this revision.Jun 22 2023, 9:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2023, 9:27 AM
klausler requested review of this revision.Jun 22 2023, 9:27 AM
PeteSteinfeld accepted this revision.Jun 22 2023, 1:24 PM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Jun 22 2023, 1:24 PM
This revision was automatically updated to reflect the committed changes.