[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug c++/16706] [3.4/3.5 Regression] ICE in finish_member_declaration, at cp/semantics.c:2126



------- Additional Comments From bangerth at dealii dot org  2004-07-26 00:54 -------
I can't seem to get it smaller than this: 
------------------------ 
template <typename> struct B { 
    B() throw() {} 
    struct S { }; 
    static int i; 
    typedef unsigned short int dummy; 
}; 
 
template <typename _Tp> 
struct allocator: B<_Tp> { 
    template<typename _Tp1> struct rebind 
    { typedef allocator<_Tp1> other; }; 
}; 
 
template<typename T, typename> 
struct X { 
    typename allocator<T>::template rebind<int>::other i; 
    typedef int* dummy; 
}; 
 
template <class T> class A { 
    typedef typename X<T,allocator<T> >::dummy dummy; 
    template <class TP> class XWrapper; 
}; 
 
 
template <class T> 
template <class TP> struct A<T>::XWrapper<TP *> 
{ 
    XWrapper() {} 
    X<int,allocator<int> > x; 
}; 
 
template class A<int>::XWrapper<int *>; 
--------------------------------- 
 
This crashes both 3.4.x and mainline, but not 3.3.x: 
 
x/gg> /home/bangerth/bin/gcc-3.3*/bin/c++ -c x.cc 
 
x/gg> /home/bangerth/bin/gcc-3.4*/bin/c++ -c x.cc 
x.cc: In instantiation of `allocator<T>::rebind<int>': 
x.cc:16:   instantiated from `X<T, allocator<T> >' 
x.cc:21:   instantiated from `A<T>' 
x.cc:29:   instantiated from `A<T>::XWrapper<TP*>::XWrapper() [with TP = int, 
T = int]' 
x.cc:33:   instantiated from here 
x.cc:11: internal compiler error: in instantiate_class_template, at 
cp/pt.c:5404 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
x/gg> /home/bangerth/bin/gcc-3.5*/bin/c++ -c x.cc 
x.cc: In instantiation of `allocator<T>::rebind<int>': 
x.cc:16:   instantiated from `X<T, allocator<T> >' 
x.cc:21:   instantiated from `A<T>' 
x.cc:29:   instantiated from `A<T>::XWrapper<TP*>::XWrapper() [with TP = int, 
T = int]' 
x.cc:33:   instantiated from here 
x.cc:11: internal compiler error: in instantiate_class_template, at 
cp/pt.c:5440 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.3.4
   Last reconfirmed|0000-00-00 00:00:00         |2004-07-26 00:54:01
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16706

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.



Reply to: