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]
Other format: [Raw text]

Re: c++/4526: ICE in g++ 3.0.1 when using typeof() as templateparameter


This is a reduced testcase:
----------------------------------
template<class T> struct A {
    typedef typename T::type type;
};

template<class T> struct B {
    void foo() {
        typedef A<typeof(BOGUS)> A;
        typename A::type i;
      }
};

template class B<int>;
----------------------------------

In the original report, BOGUS was actually something valid, but I believe 
that the failure is the same:
tmp/g> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.cc
x.cc: In instantiation of `A<__typeof (BOGUS)>':
x.cc:8:   instantiated from here
x.cc:2: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

W.

-------------------------------------------------------------------------
Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                               www: http://www.ticam.utexas.edu/~bangerth



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