Bug 63277 - Internal compiler error in output_174, at insn-output.c:1795
Internal compiler error in output_174, at insn-output.c:1795
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-04-11 18:12 EDT by dmcallis
Modified: 2007-04-18 12:41 EDT (History)
0 users

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

Attachments (Terms of Use)

  None (edit)
Description dmcallis 2002-04-11 18:12:09 EDT
Description of Problem:
Internal compiler error in output_174, at insn-output.c:1795

Version-Release number of selected component (if applicable):
gcc-2.96-98      Built Tue 04 Sep 2001 12:10:42

How Reproducible:
Every time

Steps to Reproduce:
1. gmake texture/texture.o

Actual Results:
Compile failure

Expected Results:
Compile completion

Additional Information:
Comment 1 dmcallis 2002-04-11 19:49:06 EDT
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);

  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.
Comment 2 Jakub Jelinek 2002-04-12 04:03:17 EDT
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.
Comment 3 dmcallis 2002-04-12 13:06:25 EDT
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


CFLAGS = -c -g `gtk-config --cflags` 
LFLAGS = `gtk-config --libs` 

texture_short.o:        texture_short.cc 
                        $(COMPILE) $(BASEOPCFLAGS) texture_short.cc -o texture_s

        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

typedef struct {
        INT16   tp0;
        BYTE    tpV;
        BYTE    bVal;

typedef struct {
        BYTE    CMOutEn;
        BYTE    CMOutEn2;
        TEST_VECTOR testVector;

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
Comment 4 Jakub Jelinek 2002-04-13 12:52:23 EDT
Fixed in gcc-2.96-110.

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