This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
internal compiler error in `size_binop' at fold-const.c:1873
- To: gcc-bugs at gcc dot gnu dot org
- Subject: internal compiler error in `size_binop' at fold-const.c:1873
- From: Jean-Francois Panisset <panisset at discreet dot com>
- Date: Sun, 05 Mar 2000 19:29:52 -0500
- cc: panisset at discreet dot com
To whom it may concern,
Running the following version of g++ on linux-x86:
$ g++ -v
Reading specs from /usr/local/panisset/lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
gcc version 2.96 20000228 (experimental)
The following program:
class A {
public:
A();
~A();
};
class B {
public:
unsigned int entries() const; // change this to "int" and error goes away
};
class C
{
public:
A * getMembers();
B *b;
};
A * C::getMembers()
{
return new A[b->entries()];
}
generates an internal compiler error:
$ g++ -c foo.C
foo.C: In method `A *C::getMembers ()':
foo.C:21: Internal compiler error in `size_binop', at
foo.C:21: fold-const.c:1873
foo.C:21: Please submit a full bug report.
foo.C:21: See <URL:http://www.gnu.org/software/gcc/bugs.html>
foo.C:21: for instructions.
If you change the return type of B::entries() to "int", then the
error goes away.
Hopefully this is the right place to report bugs against the CVS
code tree...
Jean-Francois Panisset panisset@discreet.com
Software Engineer
Discreet Logic