People absolutely use Coq to generate code. I don't know what else is involved.
A few substantiating links from my search results for "coq generating code":
http://coq.inria.fr/V8.1/refman/Reference-Manual021.html
http://research.microsoft.com/en-us/um/people/akenn/coq/LOLA...
http://research.microsoft.com/en-us/um/people/nick/coqasm.pd...
Re:GnuTLS considered harmful (2008)
by lallysingh on Thursday March 06, 2014 @01:00PM
(#7355395)
Oh great! Thanks. Upvoted.
For that, we'd need: (1) A set of properties to verify for an implementation (2) An implementation to verify
Looking at http://coq.inria.fr/related-tools, there may be some related tools that could do the job. Still, there's a research project there.