GCC 2.95.2 bug report...private template function crash.

Ryan C. Gordon icculus@lokigames.com
Wed Jan 26 11:58:00 GMT 2000


This is something I've come across porting some particularly ugly MSVC++
code to GCC 2.95.2... Basically the gist is that if I use a private
template function in a class, GCC gives an "internal compiler error".

I'm not really sure this is legal syntax under the c++ standard, but none
the less, an internal compiler error is never good.

Since the code I'm porting is proprietary (and I'm sure the company
wouldn't want their dirty laundry aired on the GCC buglist...), I've
boiled the code down to the simplest program I could that still generates
the compiler error. The problem appears to be coming from the template in
the "private:" section of the class.

Attached is the .cpp program, a .ZIP file of the .ii output, the (almost
empty) .s file, and stderr.txt, which contains the stderr output from GCC.

The command line used was:

 gcc -v --save-temps crackpipe.cpp 2> stderr.txt

This is on Linux kernel 2.2.14, RedHat 6.1 (glibc2.1, yadda yadda)

Please forgive the naming convention in the .cpp file; I've a sick sense
of humor.  :)

Any questions can be directed to icculus@lokigames.com ...I'll try to help
in whatever meager way I can.

---
Ryan C. Gordon
Programmer
Loki Entertainment Software


-------------- next part --------------
A non-text attachment was scrubbed...
Name: private_template_function_bug_cpp_output.zip
Type: application/zip
Size: 3474 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000126/24387ad7/attachment.zip>


More information about the Gcc-bugs mailing list