May I ask, which part of your build chain do you trust? I.e:
- Do you test the source code (and so trust the compiler); then you can reuse that unmodified and tested source code from other parts of the software, you do let the compiler optimise (inline function calls).
- Do you test the libraries (and so trust only the linker); then you can call any function of that library from other parts of the software.
- Do you test the hexadecimal code (and so only test the hardware, i.e. FLASH + processor + memory) then it is really difficult to do that sort of every "if" fully checked...