Open kumarak opened 1 year ago
@xlauko, It seems the new changes related to visit indirect call is causing this issue. Could you review how a typedef type is getting lowered into MLIR module for indirect calls?
I stripped the c file to generate a small test case to reproduce the same issue but it seems vast-cc
is able to lower the indirect call expression correctly. It seems the bug is in the integration to multiplier because of the missing typedef decl from the module that include only top-level declaration.
pkcs11-global_bug.c.gz
The lower of an indirect call expr hits
VAST_UNREACHABLE
because the typedef type is not present in the module. The error occurs while lowering the functionsc_unlock_mutex
that has indirect call expr toUnlockMutex
. Below is the code snippet that definesUnlockMutex
.It is looking for the following typedef expression that is missing from the module:
Callstack: