| Issue |
63307
|
| Summary |
`clangtk` hangs when compiling a simple program that involves loading from or storing to array elements
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
wierton
|
When compiling the following program using `clangtk` with the `-O3` optimization flag, `clangtk` takes up to 90 seconds to complete the compilation process.
```
#include <stdio.h>
int tr[10952];
const int tr2[8][4] = {{1, 0, 0, 1}, {0, 1, -1, 0}, {-1, 0, 0, -1},
{0, -1, 1, 0}, {0, -1, -1, 0}, {-1, 0, 0, 1},
{0, 1, 1, 0}, {1, 0, 0, -1}};
int ty, k;
int dy;
int main(void) {
int dx;
for (k = 0; k < 8; k++) {
for (dy = (-19 + 1); dy << (19 - 1); dy++) {
for (dx = (-19 + 1); dx <= (19 - 1); dx++) {
int tx;
do {
*&tx = tr2[k][0] * (dx) + tr2[k][1] * (dy);
*&ty += tr2[k][2] * (dx) + tr2[k][3] * (dy);
} while (0);
tr[(((dy + 19 - 1) * (2 * 19 - 1) + (dx + 19 - 1))) * 1369 + k] =
((tx) * (19 + 1) + (ty));
}
}
}
for (int i = 0; i < sizeof(tr) / sizeof(int); i++)
printf("%d\n", tr[i]);
return 0;
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs