[Bug c++/11886] New: ice in pop_binding, at cp/decl.c:1139
gcc-bugzilla at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Aug 12 00:00:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11886
Summary: ice in pop_binding, at cp/decl.c:1139
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: poschmid at lbl dot gov
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
The code t.C, extracted from cln, causes an ice.
Environment:
System: Linux linux 2.4.20-4GB #1 Fri Jul 11 07:33:18 UTC 2003 i686 unknown unknown GNU/Linux
Architecture: i686
SuSE 8.2
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c++,f77,objc --enable-__cxa_atexit --enable-debug
How-To-Repeat:
struct cl_heap {
};
class cl_rcpointer {
public:
void* pointer;
};
template <class htentry> struct _cl_hashtable_iterator;
template <class htentry>
struct cl_heap_hashtable : public cl_heap {
friend struct _cl_hashtable_iterator<htentry>;
protected:
typedef struct htxentry {
htentry entry;
} htxentry;
long _size;
htxentry * _entries;
public:
cl_heap_hashtable (long initial_size = 5) : cl_heap (),
_size (initial_size){ }
_cl_hashtable_iterator<htentry> iterator ();
};
template <class htentry>
struct _cl_hashtable_iterator
{
private:
typename cl_heap_hashtable<htentry>::htxentry * _entries;
long _index;
public:
_cl_hashtable_iterator (typename cl_heap_hashtable<htentry>::htxentry * e, long i)
: _entries (e), _index (i) {}
};
template <class htentry>
inline _cl_hashtable_iterator<htentry> cl_heap_hashtable<htentry>::iterator ()
{
return _cl_hashtable_iterator<htentry>::_cl_hashtable_iterator(_entries,_size);
}
template <class key1_type, class key2_type, class value_type>
struct cl_htentry2 {
};
template <class key1_type, class key2_type, class value_type>
struct cl_heap_hashtable_2 : public cl_heap_hashtable <cl_htentry2 <key1_type,key2_type,value_type> > {
protected:
typedef typename cl_heap_hashtable <cl_htentry2 <key1_type,key2_type,value_type> >::htxentry htxentry;
};
typedef cl_htentry2<cl_rcpointer,cl_rcpointer,cl_rcpointer> cl_htentry_from_rcpointer2_to_rcpointer;
typedef cl_heap_hashtable_2<cl_rcpointer,cl_rcpointer,cl_rcpointer> cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer;
typedef _cl_hashtable_iterator<cl_htentry_from_rcpointer2_to_rcpointer> cl_hashtable_from_rcpointer2_to_rcpointer_iterator;
struct cl_wht_from_rcpointer2_to_rcpointer : public cl_rcpointer {
cl_hashtable_from_rcpointer2_to_rcpointer_iterator iterator () const
{ return ((cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer)->iterator(); }
};
g++ -v -W -Wall t.C -save-temps
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c++,f77,objc --enable-__cxa_atexit --enable-debug
Thread model: posix
gcc version 3.4 20030806 (experimental)
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.4/cc1plus -E -quiet -v -D_GNU_SOURCE t.C -mtune=pentiumpro -W -Wall -o t.ii
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4/i686-pc-linux-gnu
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4/backward
/usr/local/include
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/include
/usr/include
End of search list.
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.4/cc1plus -fpreprocessed t.ii -quiet -dumpbase t.C -mtune=pentiumpro -auxbase t -W -Wall -version -o t.s
GNU C++ version 3.4 20030806 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.4 20030806 (experimental).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31899
t.C: In member function `cl_hashtable_from_rcpointer2_to_rcpointer_iterator
cl_wht_from_rcpointer2_to_rcpointer::iterator() const':
t.C:39: instantiated from `_cl_hashtable_iterator<htentry> cl_heap_hashtable<htentry>::iterator() [with htentry = cl_htentry_from_rcpointer2_to_rcpointer]'
t.C:61: instantiated from here
t.C:39: internal compiler error: in pop_binding, at cp/decl.c:1139
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Compilation exited abnormally with code 1 at Sun Aug 10 18:20:11
More information about the Gcc-bugs
mailing list