How do I report a GCC internal compiler error?

Question

GCC gave me an internal compiler error with a message saying I should submit a full bug report. How do I do that?

Answer

First make sure that the bug is not already fixed in the most recent release of Sourcery CodeBench for your target. CodeSourcery does not generally investigate bug reports or provide updates for older releases unless you have a long-term support contract.

If you are a Sourcery CodeBench subscription customer, please file an issue in the Sourcery CodeBench Support Portal to report an internal compiler error.

If you are a Sourcery CodeBench Lite Edition user, you should send your bug report to the CodeSourcery public discussion forum for your target, which you can reach from the Lite Edition section of CodeSourcery's web site.

Your bug report should include a self-contained test case, the exact command used to invoke the compiler, and the exact compiler output. In most cases, a self-contained test case means preprocessed source code. The easiest way to obtain this is to to add -v -save-temps to your compile command line; this writes the preprocessor output to a file with a .i or .ii extension. For example:

arm-none-eabi-g++ -v -save-temps ...normal compiler options... 2>&1 compiler.log

From the Sourcery CodeBench IDE, you can add the compiler flags by going to the Project Properties dialog and selecting C/C++ Build -> Settings, then going to the Miscellaneous group under Sourcery CodeBench C Compiler or Sourcery CodeBench C++ Compiler. Then rebuild your project and cut-and-paste the compiler output from the Console tab into your bug report. Also attach the .i or .ii file from the failed compilation.

It is helpful if you can reduce the test case, for example to a single function. However, it is important that your test case be a syntactically complete program that is expected to compile correctly (and not, for instance, just a few statements extracted from the function that is failing to compile).


This entry was last updated on 11 October 2011.