Mmmm... and why not have an external tool, part of the GCC family but with a proper API, to allow to use ANY TOOL instead of bloating GCC with one more tool that won't be usable on other compilers and will need specific maintainers, althought this field is already really complex and need a lot of different knowledges ?
For example, it could be based on intermediate code so better than just source-code or machine-code analysis...