This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Template instatiation internal error.
- To: bug-gcc at gnu dot org
- Subject: Template instatiation internal error.
- From: Anders Lindgren <andersl at iar dot se>
- Date: 25 Jan 2000 16:30:20 +0100
Hi!
The program below crashes GCC with the following output:
/------------------
test.cpp: In method `int a_class<16>::f(int)':
test.cpp:9: instantiated from here
test.cpp:4: Internal compiler error in `int_mode_for_mode', at stor-layout.c:202
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
\------------------
* Gcc version: 2.95.2
* System: Solaris
* Command line options: none.
(The bug was triggered when compiling the Dinkumware standard C++
library.)
-- Anders
------------------------------8<==============================
template<int size> class a_class {
public:
int f(int i) { return "\0"[i]; }
};
a_class<16> foo;
int test(void) { return foo.f(0); }