| Issue |
235435
|
| Summary |
llubi accepts an indirect call with a mismatched calling convention
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Roticv912
|
An indirect call using the default calling convention executes a fastcc function and returns normally without reporting undefined behavior.
### Program
```llvm
@fp = global ptr @f
define fastcc void @f() { ret void }
define i32 @main() {
entry:
%p = load ptr, ptr @fp
call void %p()
ret i32 0
}
```
### Output
```
Entering function: main
%p = load ptr, ptr @fp, align 8 => ptr 0x8 [@f]
Entering function: f
ret void
Exiting function: f
call void %p()
ret i32 0
Exiting function: main
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs