| Issue |
58209
|
| Summary |
Flaky "invalid forward reference to function"
|
| Labels |
opaque-pointers,
llvm
|
| Assignees |
|
| Reporter |
PiJoules
|
```
@glob = constant i64 ptrtoint (i64* @glob to i64)
define void @call_func() {
call void @func()
ret void
}
define i32 @func() {
ret i32 1
}
```
This IR will fail with:
```
./bin/llc: error: ./bin/llc: /tmp/test4.ll:4:13: error: invalid forward reference to function 'func' with wrong type: expected 'i32 ()*' but was 'void ()*'
call void @func()
^
```
but if I comment out `@glob`, there is no error. Adding some printfs, it looks like the types when `@glob` is not commented out are:
```
void ()*
i32 ()*
```
but when it is commented out, the types are both `ptr`. I imagine the failure should persist independently of `@glob`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs