Machine-translated by Google. Questions are authored in English.
Top

Discussion

Testing an optimising compiler is difficult chiefly because

  • A.a defect may appear only in rare combinations of transformations
  • B.optimised programs cannot be executed on the target machine at all
  • C.the optimiser has no observable effect on the output of the program
  • D.compilers are far too small to require any systematic testing at all

Answer: A

The interactions between passes are numerous and hard to enumerate, so a fault may lie dormant until one particular sequence of transformations meets one particular shape of code. Randomised program generation and differential testing against other compilers are the usual responses, since a miscompilation that surfaces rarely can be extremely costly.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.