[PATCH] D42576: [test-suite] Add prototypes to functions in Olden and MiBench
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 28 09:39:22 PST 2018
arichardson added a comment.
Calling K&R functions is not a problem. It is fine to use them as long as there is a declaration with the parameter types in the LLVM IR and not just an `declare i32 @foo(...)`. The problem is that we are calling functions that don't have a declaration and therefore the compiler assumes that it is a variadic function call. This leads to runtime crashes on our CHERI platform.
They are not necessarily correct C programs since they include undefined behaviour
Repository:
rT test-suite
https://reviews.llvm.org/D42576
More information about the llvm-commits
mailing list