Page MenuHomePhabricator

[flang] More precise checks for NULL() operands
ClosedPublic

Authored by klausler on Sep 16 2021, 11:43 AM.

Details

Summary

Improve checking for NULL() and NULL(MOLD=) when used as
variables and expressions outside the few contexts where
a disassociated pointer can be valid. There were both
inappropriate errors and missing checks.

Diff Detail

Event Timeline

klausler created this revision.Sep 16 2021, 11:43 AM
klausler requested review of this revision.Sep 16 2021, 11:43 AM
PeteSteinfeld accepted this revision.Sep 16 2021, 2:01 PM

All looks good.

flang/lib/Semantics/check-omp-structure.cpp
55–62

This change doesn't seem related to everything else (although it looks good). Did you mean to include it?

This revision is now accepted and ready to land.Sep 16 2021, 2:01 PM
klausler added inline comments.Sep 16 2021, 2:05 PM
flang/lib/Semantics/check-omp-structure.cpp
55–62

Yes, I do. It avoids a crash that I ran into while testing some earlier forms of my patch, and it seemed worth keeping to avoid having to change it again in the future.

This revision was landed with ongoing or failed builds.Sep 16 2021, 3:53 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 16 2021, 3:53 PM