This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12844] New: ICE on anonymous struct inheritance with -gxcoff on AIX
- From: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Oct 2003 17:23:42 -0000
- Subject: [Bug c++/12844] New: ICE on anonymous struct inheritance with -gxcoff on AIX
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12844
Summary: ICE on anonymous struct inheritance with -gxcoff on AIX
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: casey dot liscum at isinet dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc-ibm-aix5.1.0.0
GCC host triplet: powerpc-ibm-aix5.1.0.0
GCC target triplet: powerpc-ibm-aix5.1.0.0
ICE in g++ when inheriting a typedef'd anonymous struct, and when compiling with
-gxcoff on AIX. This code works on Linux i686 and Solaris with the same compiler
version. The problem is non-existant without -gxcoff.
Environment:
System: AIX sandbox 1 5 000CC40D4C00
host: powerpc-ibm-aix5.1.0.0
build: powerpc-ibm-aix5.1.0.0
target: powerpc-ibm-aix5.1.0.0
configured with: ./configure --prefix=/links/extern/aix51
How-To-Repeat:
--- foo.cpp -------------------------
typedef struct {} foo_s;
class foo : public foo_s {};
-------------------------------------
$ g++ -Wall -gxcoff -c -o foo.o foo.cpp
foo.cpp:2: Internal compiler error in tree_low_cst, at tree.c:3485
...
--- foo.ii --------------------------
# 1 "foo.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "foo.cpp"
typedef struct {} foo_s;
class foo : public foo_s {};
-------------------------------------
--- foo.s ---------------------------
.file "foo.cpp"
.toc
.csect _foo.rw_cpp[RW],3
.csect .text[PR]
.stabx "__int128_t:t1=r1;0;-1;",0,140,0
.stabx "__uint128_t:t2=r2;0;-1;",0,140,0
.stabx "complex int:t3=s8real:-1,0,32;imag:-1,32,32;;",0,140,0
.stabx "complex float:t4=R3;8;0;",0,140,0
.stabx "complex double:t5=R4;16;0;",0,140,0
.stabx "complex long double:t6=R4;16;0;",0,140,0
.stabx "wchar_t:t7=r7;0;65535;",0,140,0
.stabx "__builtin_va_list:t8=*-2",0,140,0
.stabx "bool:t9=eFalse:0,True:1,;",0,140,0
.stabx "__vtbl_ptr_type:t10=*11=f-1",0,140,0
.stabx "foo_s:t12=s1;",0,140,0
.stabx "foo:T13=s1foo_s:12,0,sandbox:/work/links/cliscum/Links-MAIN/isilib/ctree
------------------------------------
------- Additional Comments From casey dot liscum at isinet dot com 2003-10-30 17:23 -------
Fix:
1) Compile without -gxcoff
2) Change line 1 of foo.cpp thus:
< typedef struct {} foo_s;
---
> typedef struct SOMENAME {} foo_s;