Path: utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!cornell!flanagan
From: flanagan@odin.cs.cornell.edu (Doug Flanagan)
Newsgroups: comp.lang.c++
Subject: cfront dies on the following
Message-ID: <22978@cornell.UUCP>
Date: 29 Nov 88 22:18:20 GMT
Sender: nobody@cornell.UUCP
Reply-To: flanagan@cs.cornell.edu (Doug Flanagan)
Distribution: comp
Organization: Cornell Univ. CS Dept, Ithaca NY
Lines: 37
One of our C++ users is having a problem with the AT&T C++ 1.2 I installed on
our Sun 3's. His description:
/* File t.c */
struct A { int i; };
struct B { A& a; B(A&);}; // B::a is a reference to variable of type A
B::B(A& b) : a(b) {} //line 5: initialization of B::a to b causes trouble
/*
This is what happens when you try to compile this file on a SUN 3/50:
% CC -c t.c
CC t.c:
"t.c", line 5: internal <> error: bus error (or something nasty like that)
1 error
%
Compiling with flag -Fc one finds that cfront gets into the definition
of B::B(A&) but dies at the point where it wants to initialize B::a; the
last fragment of a line it writes is
_au0_this -> _B_a =
after which it dies. On a MacII (rather than a SUN 3/50) cfront
often gets past this point, and does the right thing. However it usually
has trashed something else in memory, often leading to rather interesting
consequences 5-10 minutes later.
*/
Is there a bug fix I can install which will help? Is 1.2.1 the most
recent version of cfront? Is there a mistake in this users program?
Thanks. Please reply to flanagan@lnssun1.tn.cornell.edu
-Doug Flanagan
Nuclear Studies
Cornell U.