Bug 63277
| Summary: | Internal compiler error in output_174, at insn-output.c:1795 | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | dmcallis |
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED RAWHIDE | QA Contact: | Brian Brock <bbrock> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.1 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i686 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2002-04-12 17:06:29 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
dmcallis
2002-04-11 22:12:09 UTC
I extracted the buggy function and all of it's dependent garbage and was able
to make it continue failing with a much smaller file (like 300 lines vs. 300
files). I was able to isolate the problem to lines of the form:
stats->testVector.tifport0 = (INT16)(p->p0 & port0Mask);
where:
stats is a large structure including a structure named testVector that has a
short named tifport0,
INT16 is typedef to be a short,
p is a structure consisting of six int (p0-p5),
port0Mask is also an int.
If you managed to cut it down into a 300 line testcase, then please preprocess it (gcc -E) and attach here. Without testcase there is nothing I can do about this. Here's the file that fails. I've chopped it down about as much as possible to
still see the failure. I also included the Makefile. It doesn't fail when I
get rid of the -O4, and it also doesn't seem to fail when I get rid of the
CM_PORTTYPE structure and just use a plain INT32 for p0.
The Makefile is the following:
// Begin Makefile
OPTIMIZE_LEVEL = -O4
BASEOPCFLAGS = -c $(OPTIMIZE_LEVEL) -Iinclude
COMPILE = g++
CFLAGS = -c -g `gtk-config --cflags`
LFLAGS = `gtk-config --libs`
texture_short.o: texture_short.cc
$(COMPILE) $(BASEOPCFLAGS) texture_short.cc -o texture_s
hort.o
clean:
rm -f texture_short.o
// End Makefile
The C++ code is the following:
// Begin texture_short.cc
typedef unsigned char BYTE;
typedef short INT16;
typedef int INT32;
typedef double REAL;
typedef struct {
INT32 p0; // This was much bigger
} CM_PORTTYPE;
typedef struct {
INT16 tp0;
BYTE tpV;
BYTE bVal;
} TEST_VECTOR;
typedef struct {
BYTE CMOutEn;
BYTE CMOutEn2;
TEST_VECTOR testVector;
} STATS;
void
loadIRPixelPorts(CM_PORTTYPE *p, REAL p0, INT32 irMask, STATS *stats)
{
REAL p0Mult = 65536.0; // 16 bits unsigned
REAL p0IRMult = 4096.0; // 16 bits unsigned 3.12
INT32 p0Mask = 0x0ffff; // 12 bits
INT32 p0IR = irMask & 1;
if (p0IR) p->p0 = (INT32) (p0 * p0IRMult);
else p->p0 = (INT32)(p0 * p0Mult);
if (stats->CMOutEn || stats->CMOutEn2) {
stats->testVector.tpV = stats->testVector.bVal;
// The compile problem is the next line
stats->testVector.tp0 = (INT16)(p->p0 & p0Mask);
}
}
// End texture_short.cc
Fixed in gcc-2.96-110. |