Commit 7689436
committed
Fix issue with type-bound function with pointer return value
newargs_for_entry() generates descriptor arguments for
subprograms. Re-use (or preserve) a previously created
descriptor for a function result. That's because the
function could be used with a type bound procedure
where the compiler relies on the previously created
descriptor to get the order of the passed object's
type descriptor correct. Otherwise, the function
result will probably not have a previously created
descriptor. Code existed that covered this case
for derived type results but not simple variable
results. To fully cover this case, add a call to
needs_descriptor() as part of the check in the call
to set_preserve_descriptor().1 parent 72e5222 commit 7689436
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2625 | 2625 | | |
2626 | 2626 | | |
2627 | 2627 | | |
2628 | | - | |
2629 | | - | |
2630 | | - | |
2631 | | - | |
2632 | | - | |
2633 | 2628 | | |
2634 | 2629 | | |
2635 | | - | |
| 2630 | + | |
| 2631 | + | |
2636 | 2632 | | |
2637 | 2633 | | |
2638 | 2634 | | |
| |||
0 commit comments