This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 432303 - gcc internal compiler error in final_scan_insn
gcc internal compiler error in final_scan_insn
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gcc (Show other bugs)
i386 Linux
low Severity high
: rc
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2008-02-10 23:02 EST by Jerry Leichter
Modified: 2012-06-20 12:19 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-20 12:19:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Pre-processed output mentioned in compiler error message (219.34 KB, text/plain)
2008-02-10 23:02 EST, Jerry Leichter
no flags Details
Input file (204.78 KB, text/plain)
2008-02-11 10:02 EST, Jerry Leichter
no flags Details

  None (edit)
Description Jerry Leichter 2008-02-10 23:02:00 EST
Description of problem:
gcc dies with internal error:

/emc/leichj/p4/main/smarts/platform/include/cmpbase.h: In function `void __stati
c_initialization_and_destruction_0(int, int)':
/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)

How reproducible:
Pre-processed code is attached.

Steps to Reproduce:
Actual results:
Compiler dies.

Expected results:
Compiler works!

Additional info:
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.)
Comment 1 Jerry Leichter 2008-02-10 23:02:00 EST
Created attachment 294532 [details]
Pre-processed output mentioned in compiler error message
Comment 2 Jerry Leichter 2008-02-10 23:07:15 EST
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.
Comment 3 Jerry Leichter 2008-02-10 23:14:01 EST
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.
Comment 4 Jerry Leichter 2008-02-11 10:02:19 EST
Created attachment 294565 [details]
Input file

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
Comment 5 Jerry Leichter 2008-02-11 14:59:28 EST
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.
Comment 6 Jiri Pallich 2012-06-20 12:19:38 EDT
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

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.

Note You need to log in before you can comment on or make changes to this bug.