Fortran standard 7.3.2.3 point 7 mentions that a diassociated
pointer dynamic type is its declared type.
in 9.7.2 note 1, when a NULLIFY statement is applied to a polymorphic pointer,
its dynamic type becomes the same as its declared type.
This patch enforce these standard points by calling the runtime function
PointerNullifyDerived with the declared type descriptor.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
flang/lib/Lower/Bridge.cpp | ||
---|---|---|
2207 | I am not sure what are the requirements for the other cases where "disassociateMutableBox" is called (like for p => Null), but I am wondering if this should not be done in disassociateMutableBox. | |
2214 | Shouldn't you "continue" the loop here to not call disassociateMutableBox ? |
I am not sure what are the requirements for the other cases where "disassociateMutableBox" is called (like for p => Null), but I am wondering if this should not be done in disassociateMutableBox.
I am OK to have this only done here until it is clear what are the requirements for the other contexts where it is called.