The Compilation Problem Isolator (CPI) helps pinpoint compile-time problems in C and C++ programs which will not compile because of a syntax error, compiler bug, etc. CPI reduces the size of test cases by removing all source code lines within a file that do not contribute to the error.
Invoke CPI from the command line with the following syntax:
icpi myfile
where myfile
is your original source
file. CPI will create an output file with the name of the original file and an
extension of
.tsf.orig_ext
, where orig_ext
is the extension of
the original file (usually .c or .cpp). For example, the command
icpi prog.c
will create an output file called prog.tsf.c.
You can get the command-line options by typing
icpi /?
The output of the icpi /?
command is listed below:
/COMPILER=<compiler_path> (required)
/LOGFILE=<logfile_path> (required, logfile contains completion log)
[/ERRORMATCH=<matching_criteria_file_path>] (default is ErrorMatch.txt)
[/ERRORMATCH=<matching_error_text>] (icpi will
look for this error text only. If "^>*" is at the beginning of the
matching_error_text, icpi will ignore the text before the error_text.
[/SAVESTEP=] (saves the intermedium files into filename.tsf.cpp.x) For example:
The ErrorMatch.txt file
If a text file called ErrorMatch.txt file is found in the current working directory, CPI will look for strings specified in this file. You can also specify the name of the file using the /ERRORMATCH command-line option. There is an example of ErrorMatch.txt in the doc directory of the Intel C/C++ Compiler. Below is another example of the contents of ErrorMatch.txt.
CPI by default will only look for compile-time issues. To look for errors that arise during
linking, use the /linkerr
option.