Unverified Commit f81d5e54 authored by jeanPerier's avatar jeanPerier Committed by GitHub
Browse files

[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.
parent 28c29fbe
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment