This is an archive of the discontinued LLVM Phabricator instance.

[flang] Set the addendum when establishing pointer section in descriptor
ClosedPublic

Authored by jeanPerier on Nov 5 2021, 3:36 AM.

Details

Summary

If the source has an addendum, the descriptor that is being established
to describe a section over the source needs to copy the addendum so that
derived type information is correctly set in the descriptor being
established.

This allows namelist IO with derived type to work correctly.

Diff Detail

Event Timeline

jeanPerier created this revision.Nov 5 2021, 3:36 AM
jeanPerier requested review of this revision.Nov 5 2021, 3:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 5 2021, 3:36 AM
klausler accepted this revision.Nov 5 2021, 9:15 AM

Thank you so much for finding this!

flang/runtime/descriptor.cpp
244

Please use braced initialization here in the runtime, and you can put the auto *addendum{Addendum()} into the if statement.

This revision is now accepted and ready to land.Nov 5 2021, 9:15 AM
vdonaldson accepted this revision.Nov 5 2021, 9:36 AM

Use flang coding style.

jeanPerier marked an inline comment as done.Nov 8 2021, 12:54 AM