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
Created attachment 44777 [details] common header file oops_rt.h
Created attachment 44778 [details] r.h
Created attachment 44779 [details] r.cpp
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).
Verified ok in g++ 3.2