Bug 59395

Summary: Internal compiler error in tree_low_cst at tree.c 4325
Product: [Retired] Red Hat Linux Reporter: Babu Arunachalam <babu.arunachalam>
Component: gcc3Assignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: babu.arunachalam
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-12-15 19:19:16 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:
Attachments:
Description Flags
common header file oops_rt.h
none
r.h
none
r.cpp none

Description Babu Arunachalam 2002-02-06 22:37:15 UTC
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 22:38:54 UTC
Created attachment 44777 [details]
common header file oops_rt.h

Comment 2 Babu Arunachalam 2002-02-06 22:41:42 UTC
Created attachment 44778 [details]
r.h

Comment 3 Babu Arunachalam 2002-02-06 22:43:21 UTC
Created attachment 44779 [details]
r.cpp

Comment 4 Jakub Jelinek 2002-02-07 13:57:37 UTC
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 19:19:16 UTC
Verified ok in g++ 3.2