Design and Implementation of an Automatic Test Case Generation Method for Compiler Optimization
He Yeping · Journal of Chinese Computer Systems · 2009
Compiler quality is vital to the software development. It's a common way testing the compiler to guarantee its correctness. Optimization modules are important parts of a compiler. Testing optimization modules requires a great number of test cases. Hand coded test cases result in low productivity, and grammar based automatically generated test cases are in lack of accuracy for optimizations. A formal description based automatic test case generation method for optimizations presented in this paper overcomes these problems. The method generates test case programs for specific compiler optimizations. Experiments on coverage testing GCC-4.1.1 show that the method generates test cases with accuracy for specific optimizations, and certain coverage is achieved.