This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc 2.95.2: Internal compiler error in `find_function_data', at function.c:542
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc 2.95.2: Internal compiler error in `find_function_data', at function.c:542
- From: Dan Halbert <halbert at bbn dot com>
- Date: Mon, 18 Sep 2000 16:26:35 -0400
- CC: halbert at bbn dot com
This minimal program:
========================
class Testclass {
public:
static const int LENGTH;
char chars[LENGTH];
int i;
void testclass1() { i = 1; };
void testclass2() { i = 2; };
};
const int Testclass::LENGTH = 3;
==========================
generates this error:
p.cpp: In method `void Testclass::testclass2()':
p.cpp:9: Internal compiler error in `find_function_data', at function.c:542
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
Deleting various lines of this program removes the error:
1. The static const must be initialized outside the class declaration.
2. There must be two member functions.
3. The "int i" must be present and used in a function.
4. the chars[LENGTH] must be present.
gcc -v reports:
Reading specs from
/d4mutl/exp.gnu/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Regards,
Dan Halbert