This is an archive of the discontinued LLVM Phabricator instance.

[flang] Unlimited polymoprhic allocation with intrinsic type spec
ClosedPublic

Authored by clementval on Dec 16 2022, 4:47 AM.

Details

Summary

An unlimited polymoprhic entity can be allocated with a derived type
spec or an intrinsic type spec. This patch add the generation of the
runtime function call when the allocation is done with an intrinsic
type spec.

Diff Detail

Event Timeline

clementval created this revision.Dec 16 2022, 4:47 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 16 2022, 4:47 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Dec 16 2022, 4:47 AM

Aside from the one nit, things build and test correctly and look good. I don't understand this code very well, though, so @jeanPerier should approve.

flang/lib/Lower/Allocatable.cpp
522

Did you mean to say "derived type specific information"?

jeanPerier accepted this revision.Dec 16 2022, 6:43 AM

Small nit. LGTM otherwise.

flang/lib/Lower/Allocatable.cpp
509

Could you name the argument corank instead of c0 to help readers ? (I saw it is named like that below, but I guess it could also be changed).

This revision is now accepted and ready to land.Dec 16 2022, 6:43 AM
clementval added inline comments.Dec 16 2022, 6:50 AM
flang/lib/Lower/Allocatable.cpp
509

Sure. I'll update that.

522

It stand for derived-type specification but often abbreviated like that in the code (see derivedTypeSpec() below)

Address review comments