Commit a43fb2b
authored
[OpenACC] Fix issue with array-section type generation (#162499)
When an array section bound was in a list of bound-types we improperly
generated the list of types of the bounds because
getPointeeOrElementType gets the LOWEST level of type (that is, digs
through ALL array types to get to the base-est of types) when what
we really wanted was 1 layer of pointer/array removed.
This patch fixes it and adds a test that showed the problem by
re-ordering the existing ones. This wasn't previously obvious by chance,
since the 'array-index-only' variants ended up generating the recipe,
and not the bounds.1 parent 8c9c91f commit a43fb2b
File tree
2 files changed
+6
-3
lines changed- clang
- lib/CIR/CodeGen
- test/CIR/CodeGenOpenACC
2 files changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
0 commit comments