This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11991] New: ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:282 when applying typeid operator to template template parameter
- From: "blaz at blazlabs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Aug 2003 11:55:46 -0000
- Subject: [Bug c++/11991] New: ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:282 when applying typeid operator to template template parameter
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11991
Summary: ICE in cxx_incomplete_type_diagnostic, at
cp/typeck2.c:282 when applying typeid operator to
template template parameter
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: blaz at blazlabs dot com
CC: gcc-bugs at gcc dot gnu dot org
>g++ -v -save-temps -c test.cpp
Reading specs from d:/gcc/bin/../lib/gcc-lib/mingw32/3.3.1/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable
-languages=c,c++,f77,objc,ada,java --disable-win32-registry --disable-shared --e
nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-ja
va-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchroniz
ation
Thread model: win32
gcc version 3.3.1 (mingw special 20030804-1)
d:\gcc\bin\..\lib\gcc-lib\mingw32\3.3.1\cc1plus.exe -E -D__GNUG__=3 -quiet -v -
iprefix d:\gcc\bin/../lib/gcc-lib/mingw32/3.3.1/ -D__GNUC__=3 -D__GNUC_MINOR__=3
-D__GNUC_PATCHLEVEL__=1 test.cpp test.ii
ignoring nonexistent directory "d:/gcc/mingw32/include"
ignoring nonexistent directory "/mingw/include/c++/3.3.1"
ignoring nonexistent directory "/mingw/include/c++/3.3.1/mingw32"
ignoring nonexistent directory "/mingw/include/c++/3.3.1/backward"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/lib/gcc-lib/mingw32/3.3.1/include"
ignoring nonexistent directory "/mingw/mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
d:/gcc/include/c++/3.3.1
d:/gcc/include/c++/3.3.1/mingw32
d:/gcc/include/c++/3.3.1/backward
d:/gcc/include
d:/gcc/lib/gcc-lib/mingw32/3.3.1/include
End of search list.
d:\gcc\bin\..\lib\gcc-lib\mingw32\3.3.1\cc1plus.exe -fpreprocessed test.ii -qui
et -dumpbase test.cpp -auxbase test -version -o test.s
GNU C++ version 3.3.1 (mingw special 20030804-1) (mingw32)
compiled by GNU C version 3.3.1 20030803 (prerelease).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=65476
test.cpp: In static member function `static void A<T>::error() [with T = B]':
test.cpp:19: instantiated from here
test.cpp:11: internal compiler error: in cxx_incomplete_type_diagnostic, at
cp/typeck2.c:282
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.
Preprocessed file:
# 1 "test.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "test.cpp"
# 1 "d:/gcc/include/c++/3.3.1/typeinfo" 1 3
# 38 "d:/gcc/include/c++/3.3.1/typeinfo" 3
# 1 "d:/gcc/include/c++/3.3.1/exception" 1 3
# 40 "d:/gcc/include/c++/3.3.1/exception" 3
extern "C++" {
namespace std
{
# 52 "d:/gcc/include/c++/3.3.1/exception" 3
class exception
{
public:
exception() throw() { }
virtual ~exception() throw();
virtual const char* what() const throw();
};
class bad_exception : public exception
{
public:
bad_exception() throw() { }
virtual ~bad_exception() throw();
};
typedef void (*terminate_handler) ();
typedef void (*unexpected_handler) ();
terminate_handler set_terminate(terminate_handler) throw();
void terminate() __attribute__ ((__noreturn__));
unexpected_handler set_unexpected(unexpected_handler) throw();
void unexpected() __attribute__ ((__noreturn__));
# 100 "d:/gcc/include/c++/3.3.1/exception" 3
bool uncaught_exception() throw();
}
namespace __gnu_cxx
{
# 113 "d:/gcc/include/c++/3.3.1/exception" 3
void __verbose_terminate_handler ();
}
}
# 39 "d:/gcc/include/c++/3.3.1/typeinfo" 2 3
extern "C++" {
namespace __cxxabiv1
{
class __class_type_info;
}
# 55 "d:/gcc/include/c++/3.3.1/typeinfo" 3
namespace std
{
class type_info
{
public:
virtual ~type_info();
private:
type_info& operator=(const type_info&);
type_info(const type_info&);
protected:
const char *__name;
protected:
explicit type_info(const char *__n): __name(__n) { }
public:
const char* name() const
{ return __name; }
bool before(const type_info& __arg) const;
bool operator==(const type_info& __arg) const;
# 106 "d:/gcc/include/c++/3.3.1/typeinfo" 3
bool operator!=(const type_info& __arg) const
{ return !operator==(__arg); }
public:
virtual bool __is_pointer_p() const;
virtual bool __is_function_p() const;
virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj,
unsigned __outer) const;
virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target,
void **__obj_ptr) const;
};
class bad_cast : public exception
{
public:
bad_cast() throw() { }
virtual ~bad_cast() throw();
};
class bad_typeid : public exception
{
public:
bad_typeid () throw() { }
virtual ~bad_typeid() throw();
};
}
}
# 2 "test.cpp" 2
template
<
template <class> class T
>
struct A
{
static void error()
{
const char * name = typeid(T).name();
}
};
template <class T> struct B {};
int main(int argc, char **argv)
{
A<B>::error();
return 0;
}