Article View: gnu.g++.bug
Article #1152bug in g++ 2.3.2 ?
From: Joerg Wedeck
Date: Mon, 21 Dec 1992 16:20
Date: Mon, 21 Dec 1992 16:20
55 lines
2034 bytes
2034 bytes
Hi,
i probably have found a bug in g++ 2.3.2. Please look at the
following program (in the following named test.C):
#include <stream.h>
extern "C" int rand();
class test {
int a, b;
public:
test() {a=b=0;}
test(int i) {a=b=i;}
};
main()
{
test a,b;
int r;
r = rand();
a = (test) r; // this works fine
b = (test) rand(); // this line causes the problem
}
Compilation of this program results in following error message:
snoopy% g++ -v test.C
Reading specs from /usr/local/gnu/lib/gcc-lib/sun4os4/2.3.2/specs
gcc version 2.3.2
/usr/local/gnu/lib/gcc-lib/sun4os4/2.3.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix test.C /usr/tmp/cca14760.i
GNU CPP version 2.3.2 (sparc)
/usr/local/gnu/lib/gcc-lib/sun4os4/2.3.2/cc1plus /usr/tmp/cca14760.i -quiet -dumpbase test.cc -version -o /usr/tmp/cca14760.s
GNU C++ version 2.3.2 (sparc) compiled by GNU C version 2.3.2.
test.C: In function `int main ()':
test.C:19: Internal compiler error.
test.C:19: Please report this to `bug-g++@prep.ai.mit.edu'.
snoopy%
Regards,
Joerg
--
--------------------------------+-------------------------------------
Joerg Wedeck | E-Mail: jw@peanuts.informatik\
Universitaet Tuebingen | .uni-tuebingen.de
Lehrstuhl fuer Techn. Informatik|
Sand 13 |
7400 Tuebingen |
Germany |
--------------------------------+-------------------------------------
Technical Details
Message-ID:
<9212211420.AA01357@life>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!peanuts.informatik.uni-tuebingen.de!jwShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!peanuts.informatik.uni-tuebingen.de!jw From: jw@peanuts.informatik.uni-tuebingen.de (Joerg Wedeck) Subject: bug in g++ 2.3.2 ? Message-ID: <9212211420.AA01357@life> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Mon, 21 Dec 1992 16:20:05 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 57