This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc 2.95.2: Internal compiler error in `find_function_data', at function.c:542


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]