Red Hat Bugzilla – Bug 432303
gcc internal compiler error in final_scan_insn
Last modified: 2012-06-20 12:19:38 EDT
Description of problem:
gcc dies with internal error:
/emc/leichj/p4/main/smarts/platform/include/cmpbase.h: In function `void __stati
/emc/leichj/p4/main/smarts/platform/include/cmpbase.h:-20902: internal compiler
error: in final_scan_insn, at final.c:1794
Version-Release number of selected component (if applicable):
gcc 3.4.5 20051201 (Red Hat 3.4.5-2)
Pre-processed code is attached.
Steps to Reproduce:
The input file is a bit peculiar looking, as it's been passed through a program
that inserts instrumentation code. That's why the compiler input is actually a
file with a very funky name found in /var/tmp. One side-effect is multiple
complaints of the form:
line-map.c: file "/emc/leichj/p4/main/smarts/platform/include/cmpbase.h" left bu
t not entered
(These refer to many different files, not just the one that is also mentioned in
the crash message; and they show up in all instrumented files, but generally the
compiler has no problems.)
Created attachment 294532 [details]
Pre-processed output mentioned in compiler error message
Problem is not specific to this particular file; I've just run into another file
that produces the same failure (and others that don't). Even if a fix isn't
quickly available, some information about what might trigger the problem would
be useful as I might be able to adjust the instrumenter to avoid it.
Should have checked this and commented before: The file in question - part of a
test suite - consists of an include of a header file (which will bring in a
whole bunch more files) and a single declaration of an int variable called
"good_variable". (So, no, the attached pre-processed file has not been
The second example that crashes is a much more substantial test program.
Created attachment 294565 [details]
Given that some of the error messages seem to come from the preprocessor, I've
attached the input that gcc would have seen. The process here is: Source code
is pre-processed, then passed through instrumenter (which will *remove* some
code that came from #include's, and add a few #include's), then passed back to
Compiling the input file (second attachment) as "g++ -c -o foo.o" works (or at
least the compiler doesn't exit and produces a foo.o file).
Adding "-g" to this exact command string causes the compiler to abort with the
error at final.c:1794. No foo.o file is produced.
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life.
Please See https://access.redhat.com/support/policy/updates/errata/
If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.