This is an archive of the discontinued LLVM Phabricator instance.

[flang] Make subscript list argument a nullable pointer
ClosedPublic

Authored by klausler on Nov 5 2021, 12:35 PM.

Details

Summary

Component::CreatePointerDescriptor unconditionally expects a
vector of subscripts to be passed as an argument, but is called
from NAMELIST input with a null pointer. Make that argument
a nullable pointer, move it to the end of the argument list,
and give it a default value of nullptr.

Diff Detail

Event Timeline

klausler created this revision.Nov 5 2021, 12:35 PM
klausler requested review of this revision.Nov 5 2021, 12:35 PM
rovka accepted this revision.Nov 8 2021, 12:40 AM
rovka added a subscriber: rovka.

LGTM, but I think it would look even better if the terminator were the first parameter (instead of breaking up the flow of the other parameters).

flang/runtime/type-info.cpp
174

Why are you removing all the 0x? Seems off-topic.

This revision is now accepted and ready to land.Nov 8 2021, 12:40 AM
klausler added inline comments.Nov 8 2021, 8:35 AM
flang/runtime/type-info.cpp
174

Because I noticed that the dump output had "0x0x" in it as I was debugging the problem, so I cleaned that up.

vdonaldson accepted this revision.Nov 8 2021, 10:49 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2021, 12:12 PM