public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Testing and Verifying GCC Compiler Reproducibility
@ 2008-07-18 21:24 Michael Gould
  2008-07-18 23:47 ` David Daney
  2008-07-19  1:38 ` Ian Lance Taylor
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Gould @ 2008-07-18 21:24 UTC (permalink / raw)
  To: gcc-help

GCC team,

I'm working on a project that uses the GCC compiler.  I'm required by the FDA to produce documentation to show that the GCC compiler always gives the same results for a given set of code.  I'm concerned about testing the reproducibility of compiled code.  How do I go about testing and verifying that the compiler always reproduces the exact same compiled code for a given program?

Thanks. 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Testing and Verifying GCC Compiler Reproducibility
  2008-07-18 21:24 Testing and Verifying GCC Compiler Reproducibility Michael Gould
@ 2008-07-18 23:47 ` David Daney
  2008-07-19  1:38 ` Ian Lance Taylor
  1 sibling, 0 replies; 3+ messages in thread
From: David Daney @ 2008-07-18 23:47 UTC (permalink / raw)
  To: Michael Gould; +Cc: gcc-help

Michael Gould wrote:
> GCC team,
> 
> I'm working on a project that uses the GCC compiler.  I'm required by the FDA to produce documentation to show that the GCC compiler always gives the same results for a given set of code.  I'm concerned about testing the reproducibility of compiled code.  How do I go about testing and verifying that the compiler always reproduces the exact same compiled code for a given program?
> 

What's wrong with compiling said code once and saving the result for use as your reference, and then on successive compilations, compare the results against the reference result using the cmp (or similar) command?

David Daney

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Testing and Verifying GCC Compiler Reproducibility
  2008-07-18 21:24 Testing and Verifying GCC Compiler Reproducibility Michael Gould
  2008-07-18 23:47 ` David Daney
@ 2008-07-19  1:38 ` Ian Lance Taylor
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2008-07-19  1:38 UTC (permalink / raw)
  To: Michael Gould; +Cc: gcc-help

"Michael Gould" <mgould@sourcescientific.com> writes:

> I'm working on a project that uses the GCC compiler.  I'm required
> by the FDA to produce documentation to show that the GCC compiler
> always gives the same results for a given set of code.  I'm
> concerned about testing the reproducibility of compiled code.  How
> do I go about testing and verifying that the compiler always
> reproduces the exact same compiled code for a given program?

The normal gcc build process is to build gcc three times, and compare
the files generate during the second and third build to verify that
they are identical.  That's about as good as you can get on this
point.

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-19  0:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-18 21:24 Testing and Verifying GCC Compiler Reproducibility Michael Gould
2008-07-18 23:47 ` David Daney
2008-07-19  1:38 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).