With the scale of program increasing and program complexity rising, program slicing through direct code analysis becomes much harder. In the existed approaches that use compiler optimization techniques for obtaining more accurate slices, compile-time information and existed compiler optimization are overlooked, program languages are not fully supported. To solve this problem, this paper analyzes the intermediate representations of GCC compiler, and proposes a program slicing technology based on critical var...