Resolving Internal Errors (C++)
Go Up to Debugging Applications Index
Internal Compiler Errors
There are three kinds of errors that the C++ compiler generates that are considered to be ICEs:
- F1001 Internal code generator error:
F1001 [C++ Fatal Error] <filename>(<line>)
- F1004 Internal compiler error:
F1004 [C++ Fatal Error] <filename>(<line>):
- Internal backend error
All three of these result from bugs in the compiler. The <filename> and <line> elements are the point in your source code that the compiler was parsing prior to the error, but may or may not indicate the source of the problem. The <errorcode> element is specific information to tell the compiler engineers what the compiler was trying to do when the error occurred.
What to do if you encounter an internal compiler error
- Remember that your code may not be at fault.
- Try a clean build.
- Analyze the source to narrow the problem.
- Submit a bug report.
How to perform a clean build
- Right-click the project in the Project Manager and select clean.
- Check the directory structure to make sure there are no .obj .tds .dcu .#* or .pch files associated with your project.
- Choose Build from the Project menu.
How to analyze the source code
If a clean build does not resolve the problem, you may want to analyze the source code to narrow down the problem.
- Preprocess the file that is mentioned in the error message. This can be done by right-clicking the file in the Project Manager and choosing preprocess. This will generate a file with no external dependencies for compilation, and it might be a very large file.
- Compile the preprocessed file with the -P switch. If this is sufficient to reproduce the problem, you may go straight to step 4.
- If the .i file compiled correctly, there may be additional switches needed to reproduce the problem. Recompile the .i file adding any switched used for the original command line build until you determine which switches are needed to reproduce the problem.
- This is enough information to file a bug report. If you do not wish to narrow down the problem any further please go to the instructions for filing a bug report.
- You can delete anything after the line where the error occurs and any comments.
- Start to comment out function bodies and other portions of code which may not have anything to do with the problem.
- As you determine portions which are not necessary to reproduce the problem, you may delete those sections from the .i file.
- Once you have narrowed down the elements of code necessary to reproduce the problem, you can then submit a bug report and analyze the type of constructs used to try and find a workaround
How to file a bug report:
- Choose Quality Central from the Tools menu in the IDE.
- Click on the '+' button to create a new report.
- Choose Appmethod C++ as the project.
- Choose Compiler/C++ as the area.
- Enter the command line needed to reproduce the error in the steps of the bug.
- Attach the .i file.
- Click the check mark button to save the report.