llvm-project
f81d5e54 - [flang] Handle OPTIONAL polymorphic captured in internal procedures (#82042)

Commit
1 year ago
[flang] Handle OPTIONAL polymorphic captured in internal procedures (#82042) The current code was doing an unconditional `fir.store %optional_box to %host_link` which caused a crash when %optional_box is absent because is is attempting to copy a descriptor from a null address. Add code to conditionally do the copy at runtime. The polymorphic array case with lower bounds can be handled with the array case that already deals with descriptor argument with a few modifications, just use that.
Author
Parents
Loading