Bug 59395 - Internal compiler error in tree_low_cst at tree.c 4325
Internal compiler error in tree_low_cst at tree.c 4325
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gcc3 (Show other bugs)
7.2
i686 Linux
high Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-06 17:37 EST by Babu Arunachalam
Modified: 2008-05-01 11:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-15 14:19:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
common header file oops_rt.h (4.56 KB, patch)
2002-02-06 17:38 EST, Babu Arunachalam
no flags Details | Diff
r.h (155.82 KB, patch)
2002-02-06 17:41 EST, Babu Arunachalam
no flags Details | Diff
r.cpp (204.73 KB, patch)
2002-02-06 17:43 EST, Babu Arunachalam
no flags Details | Diff

  None (edit)
Description Babu Arunachalam 2002-02-06 17:37:15 EST
Description of Problem:

The version of linux being used is 2.4.7-10smp.

gcc3 and gcc generate an internal compiler error for a class definition which 
includes nested structures and classes.  I have included the source files 
needed for compilation. Please copy them and run gcc.

Version-Release number of selected component (if applicable):

gcc3


How Reproducible:

Every time.

Steps to Reproduce:
1. Copy pasted files r.h, oops_rt.h and r.cpp
2. g++ -g r.cpp -I. -o r.o
3. 

Actual Results:

In file included from r.cpp:26:
r.h:6282: Internal compiler error in tree_low_cst, at tree.c:4325
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

Expected Results:

Successful compilation.

Additional Information:

Please find attached files oops_rt.h, r.h and r.cpp
Comment 1 Babu Arunachalam 2002-02-06 17:38:54 EST
Created attachment 44777 [details]
common header file oops_rt.h
Comment 2 Babu Arunachalam 2002-02-06 17:41:42 EST
Created attachment 44778 [details]
r.h
Comment 3 Babu Arunachalam 2002-02-06 17:43:21 EST
Created attachment 44779 [details]
r.cpp
Comment 4 Jakub Jelinek 2002-02-07 08:57:37 EST
I agree gcc should not ICE on this.
Simplified testcase is:
struct A
{
};

struct B : public A
{
  char b[0x10000000];
} e;
The problem is that some C++ class layout routines store temporarily structure sizes
in HOST_WIDE_INT integer variables (this is normally 32-bit on IA-32) and the
structure sizes are in bits, so the above means gcc cannot fit the structure
size into signed 32-bit integer.
Quick workaround is to recompile gcc so that it will use
-DHOST_WIDE_INT=long\ long -DHOST_BITS_PER_WIDE_INT=64
(or, even better, don't build such huge classes).
Comment 5 Alan Cox 2002-12-15 14:19:16 EST
Verified ok in g++ 3.2

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