Commit 344abfa
committed
Handle vector subscripts that are not whole contiguous symbols
The array framework was building an inexact shape for the
array subscript expression `x(<vector subscript expr>)` when it is not
able to compute the actual shape of `<vector subscript expr>`. The
inexact shape was the shape of `x`. The code was defaulting in to the inexact
shape when `<vector subscript expr>` is a designator that is a
descriptor while this was not needed. This lead to runtime crash like
the one reported in #1019.
Fix:
Simply compute the vector subscript shape from the vector subscript
fir.array_load with the existing getShape(arrayLoad) helper.
This covers the cases where the vector subscripts is not a whole
symbols (function results, array sections, operation results...), with
even less code.1 parent feec79c commit 344abfa
1 file changed
+10
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
39 | | - | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
4327 | 4327 | | |
4328 | 4328 | | |
4329 | 4329 | | |
4330 | | - | |
4331 | | - | |
4332 | | - | |
4333 | | - | |
4334 | | - | |
4335 | | - | |
4336 | | - | |
4337 | | - | |
4338 | | - | |
4339 | | - | |
4340 | | - | |
4341 | | - | |
4342 | | - | |
4343 | | - | |
4344 | | - | |
4345 | | - | |
4346 | | - | |
4347 | | - | |
| 4330 | + | |
| 4331 | + | |
| 4332 | + | |
| 4333 | + | |
| 4334 | + | |
| 4335 | + | |
| 4336 | + | |
| 4337 | + | |
4348 | 4338 | | |
4349 | 4339 | | |
4350 | 4340 | | |
| |||
0 commit comments