This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs 1.1b bug report
- To: egcs-bugs at cygnus dot com
- Subject: egcs 1.1b bug report
- From: Trevor Taylor <ttaylor at powerup dot com dot au>
- Date: Tue, 06 Oct 1998 21:14:16 +1000
Hi,
I've just installed egcs 1.1b. Excellent piece of work all round, I
must say!
I got an internal compiler error on some code and it asked me to submit
a full bug report, so...
The code is attached. Here is what happens when I compile it:
+ gcc -g -I../out/ -I. -c xxx.cxx -o ../out/xxx.o
xxx.cxx: In function `int main(int, char **)':
xxx.cxx:40: Internal compiler error.
xxx.cxx:40: Please submit a full bug report to `egcs-bugs@cygnus.com'.
make: *** [../out/xxx.o] Error 1
Compilation exited abnormally with code 2 at Tue Oct 6 17:35:23
Here is the output of gcc -v:
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
It basically spits the dummy on an anonymous object expression like...
T()();
... where T has a default constructor and operator(int). Note that I
haven't
passed the required parameter! If I do, it compiles and runs.
Cheers,
Trevor
// -*- mode: c++ ; c-file-style: "osse" ; -*-
//
// Copyright (c) 1998
// Trevor Taylor
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appear in all.
// Trevor Taylor makes no representations about the suitability of this
// software for any purpose. It is provided "as is" without express or
// implied warranty.
//
// MODULE:
//
// $Id$
//
// ABSTRACT:
//
// EGCS 1.1b compiler bug report.
//
static const char rcsid[] = "$RCSfile: twt_cxx.el,v $ $Revision: 1.6 $";
class T
{
public:
T()
{
}
int operator()(int)
{
}
};
int main(int argc, char* argv[])
{
T()(1);
T()();
}