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]

ICE on computations with template parameters



Hi there,

the following code snippet produces an internal compiler error:

----------------------------
template <int dim>
class Test {
    typedef int *x[dim+1];
};
----------------------------

The compiler is egcs-19980803 on 'SunOS eris 5.6 Generic sun4u sparc
SUNW,Ultra-2' (compiler output appended below). This kind of code used to
work with the previous snapshot (19980727) so it seems that this bug was
introduced in the week before last. Note, however, that I have tested
that it was working only on Linux and not on SunOS.

Regards,
  Wolfgang



-------------------------------- compiler output -------------------
Reading specs from
/usr/local/gcc/egcs-19980803/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.53/specs
gcc version egcs-2.91.53 19980803 (gcc2 ss-980609 experimental)

/usr/local/gcc/egcs-19980803/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.53/cpp
-lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus
-D__GNUC_MINOR__=91 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__
-D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix
-Asystem(unix) -Asystem(svr4) -D__EXCEPTIONS -D__GCC_NEW_VARARGS__
-Acpu(sparc) -Amachine(sparc) x.cc /var/tmp/cc2J6p0f.ii
GNU CPP version egcs-2.91.53 19980803 (gcc2 ss-980609 experimental)
(sparc)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/gcc/egcs-19980803/include/g++
 /usr/local/include
 /usr/local/gcc/egcs-19980803/sparc-sun-solaris2.6/include

/usr/local/gcc/egcs-19980803/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.53/include
 /usr/include
End of search list.

/usr/local/gcc/egcs-19980803/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.53/cc1plus
/var/tmp/cc2J6p0f.ii -quiet -dumpbase x.cc -version -o /var/tmp/ccsnAc1l.s
GNU C++ version egcs-2.91.53 19980803 (gcc2 ss-980609 experimental)
(sparc-sun-solaris2.6) compiled by GNU C version 2.8.1.
x.cc:3: Internal compiler error.
x.cc:3: Please submit a full bug report to `egcs-bugs@cygnus.com'.






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