[Bug c++/31584] New: ICE on probably invalid code
numerical dot simulation at web dot de
gcc-bugzilla@gcc.gnu.org
Sun Apr 15 20:15:00 GMT 2007
Hi!
The following code snippet leads to an ICE, but I am not sure
whether the stuff I am trying to do is valid.
Any pointer to info about that also appreciated.
Target: i586-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2
--enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib
--with-system-zlib --enable-shared --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --program-suffix=-4.1
--enable-version-specific-runtime-libs --without-system-libunwind
--with-cpu=generic --host=i586-suse-linux
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)
enum Outer { a, b };
template <class T>
class C
{
public:
enum Inner { c, d };
template<Inner I, int dummy> struct Dispatcher;
template<int dummy> struct Dispatcher<c, dummy>
{
static const Outer Show = a;
};
template<int dummy> struct Dispatcher<d, dummy>
{
static const Outer Show = b;
};
public:
template <Inner I> void DoSomething(int j)
{
typedef Dispatcher<I, 1> dispatcher_t;
static const Outer o = dispatcher_t::Show;
}
};
int main()
{
C<double> Test;
Test.DoSomething<C<double>::c>(1);
}
--
Summary: ICE on probably invalid code
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: numerical dot simulation at web dot de
GCC host triplet: i586-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31584
More information about the Gcc-bugs
mailing list