ICE in latest snapshot c++

Horst von Brand vonbrand@sleipnir.valparaiso.cl
Wed Mar 31 23:54:00 GMT 1999


Oskar Enoksson <osken393@student.liu.se> said:
> Here is another short code snippet causing an ICE in the latest
> snapshot (egcs-2.93.10) on my platform alphaev56-dec-osf4.0d. The problem
> this time is an array length which must be calculated from a template
> argument. This bug is not in 1.1.2-pre2.
> 
> template<int N>
> void foo() {
>   int bar[N+1];
> }
> 
> int main() {
>   foo<3>();
> }

On i586 linux-2.2.2-ac7, haifa-enabled egcs-19990228, glibc-2.1 I get:

vonbrand@sleipnir:/tmp$ c++ -c tst.cc
tst.cc: In function `void foo<3>()':
tst.cc:7:   instantiated from here
tst.cc:3: Internal compiler error.
tst.cc:3: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
tst.cc:3: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for details.
-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viña del Mar, Chile                               +56 32 672616



More information about the Gcc-bugs mailing list