Commit a10a073
committed
[flang] Fix lowering of function calls that return arrays of derived types
When processing the return value of a function call, the lowering code was
incorrectly calling the template function "genarr()" for "ProcedureRef"
arguments rather than "FunctionRef" arguments. This caused the return type of
the function to be specified as "llvm::None" which caused downstream problems.
The problem was that the version of "genarr" for "FunctionRef" arguments was
declared in such a way that it only was used for arrays whose elements were
intrinsic types. I fixed this by implementing a more general version of
"genarr" for "FunctionRef" arguments that works for both intrinsic types and
derived types.1 parent 6eb7893 commit a10a073
File tree
2 files changed
+8
-7
lines changed- flang
- lib/Lower
- test/Lower/intrinsic-procedures
2 files changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5606 | 5606 | | |
5607 | 5607 | | |
5608 | 5608 | | |
5609 | | - | |
5610 | | - | |
5611 | | - | |
5612 | | - | |
5613 | | - | |
| 5609 | + | |
| 5610 | + | |
| 5611 | + | |
| 5612 | + | |
| 5613 | + | |
| 5614 | + | |
5614 | 5615 | | |
5615 | 5616 | | |
5616 | 5617 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments