Article View: gnu.g++.bug
Article #336g++ 1.35.0 cannot handle matrices of classes with constructor
From: Jochen Schwarze
Date: Mon, 07 Aug 1989 19:04
Date: Mon, 07 Aug 1989 19:04
65 lines
1989 bytes
1989 bytes
G++ 1.35.0. Bug Report
VERSION:
g++ 1.35.0
CONFIGURATION:
config++ sun3-os4
DESCRIPTION:
g++ obviously cannot handle doubly indexed arrays of classes
that have a constructor function defined but dumps core instead.
The error does not occur if the constructor function is removed
from the class or the array is made simply indexed. Making the
constructor function only a dummy one (class() {}) will not
help. Using the -O option will not, either.
REPEAT BY:
Compile the following:
class vector
{
int a[ 4 ];
public:
vector() { }
};
vector table[ 8 ][ 16 ];
main() { }
g++ dumps core, exiting with:
In function void _GLOBAL_$I$foo_cc ():
foo.cc:10: Segmentation violation
g++: Program cc1plus got fatal signal 11.
The core file (dbx) then reads:
expand_aggr_init(exp = 0xf4620, init = (nil), alias_this = 0, \
0xf3ae0, 0xa), line 748 in "cplus-init.c"
finish_file(), line 1115 in "cplus-decl.c"
yyparse(0xf3ae0), line 189 in "bison.simple"
compile_file(name = 0xefffa90 "/tmp/cca26002.cpp"), \
line 1160 in "toplev.c"
main(argc = 8, argv = 0xefff9f8, envp = 0xefffa1c), \
line 2068 in "toplev.c"
--
Jochen Schwarze
ISA GmbH
Azenbergstr. 35
7000 Stuttgart 1
West Germany
Phone +49-711-22769-0
Domain: schwarze@isaak.isa.de
UUCP: schwarze@isaak.uucp
BITNET: schwarze%isaak.uucp@unido.bitnet
Technical Details
Message-ID:
<8908071545.AA26615@escher.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!UUNET.UU.NET!unido!isaak!escher!schwarzeShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!UUNET.UU.NET!unido!isaak!escher!schwarze From: unido!isaak!escher!schwarze@UUNET.UU.NET (Jochen Schwarze) Newsgroups: gnu.g++.bug Subject: g++ 1.35.0 cannot handle matrices of classes with constructor Message-ID: <8908071545.AA26615@escher.uucp> Date: 7 Aug 89 19:04:21 GMT Sender: daemon@tut.cis.ohio-state.edu Reply-To: isaak!schwarze@uunet.uu.net Distribution: gnu Organization: GNUs Not Usenet Lines: 65 X-Unparsable-Date: Mon, 7 Aug 89 17:45:01 MET DST