Article View: gnu.g++.bug
Article #1566(none)
From: Gabor Karsai
Date: Tue, 20 Dec 1988 17:32
Date: Tue, 20 Dec 1988 17:32
48 lines
1963 bytes
1963 bytes
Some problems I have encountered using gcc/g++ (1.27) (for HP-UX, w/ HP ld):
1.) In search.c I am using the following:
void build_mi_matrix (type)
tree type;
{
register int truesize;
cid = 0;
mi_size = CLASSTYPE_N_SUPERCLASSES (type);
truesize = mi_size == 0 ? 1 : mi_size * mi_size;
mi_matrix = (char *)malloc (truesize);
mi_type = type;
bzero (mi_matrix, truesize);
dfs_walk (type, dfs_number, unnumberedp);
dfs_walk (type, dfs_record_inheritance, unmarkedp);
dfs_walk (type, dfs_unmark, markedp);
}
Explanation: On HP-UX malloc(0) returns 0, and a subsequent free will
barf on this.
2.) "collect" does not collect "cout", "cin", "cerr" for the CTOR list
because they were declared extern, but instantiated only in libg++.a.
Solution: remove the instance declaration from search.cc (of libg++),
and make an include file (e.g. stream.cc.h) which instantiates them. If a user
wants to use them just include that file.
3.) In tm-hp9k320.h:
if (frame_pointer_needed) \
{ if (TARGET_68020 || fsize < 0x8000) \
fprintf (FILE, "\tlink.w %%a6,&%d\n", -fsize); \
else
fprintf (FILE, "\tlink.w %%a6,&0\n\tsub.l &%d,%%sp\n", fsize); } \
I.e. large than 64k local (auto) var segments get screwed up.
4.) Would it be possible to include alloca.s in the gcc distribution?
Thanks,
Gabor Karsai | I'net:
Dept. of Electrical Engineering | gabork@vuse.vanderbilt.edu
Vanderbilt University |
Post Office Box 1824, Station B |Phone:
Nashville, TN, USA 37235 | [+1] 615-322-2338
Technical Details
Message-ID:
<8812201732.AA14810@vuse4>Path:
arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!VUSE.VANDERBILT.EDU!gaborkShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!VUSE.VANDERBILT.EDU!gabork From: gabork@VUSE.VANDERBILT.EDU (Gabor Karsai) Newsgroups: gnu.g++.bug Subject: (none) Message-ID: <8812201732.AA14810@vuse4> Date: 20 Dec 88 17:32:40 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 47