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]

Template instatiation internal error.





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); }

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