[Bug c++/34950] [4.2/4.3 Regression] ICE in svn boost math toolkit

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Tue Feb 12 08:17:00 GMT 2008



------- Comment #12 from bangerth at dealii dot org  2008-02-12 08:17 -------
The following variant of the testcase in comment #8 is definitely
valid but produces an ICE:
---------------------------------
template <class T = int> struct policy {
    typedef int unnecessary;
};

template <class Policy> struct A {
    typedef int type;
    typedef typename Policy::unnecessary unused;
};

template <class T> struct S {
    typedef int type;
    typedef typename A<T>::type unused;
};

template <class, class T> typename S<T>::type         foo();
template <class>                   S<policy<> >::type foo();

template <typename T> int def(T);
const int i = def(foo<int>);
-------------------------------

tmp/g> /home/bangerth/bin/x86/bin/c++ -c x.cc
x.cc: In instantiation of 'A<T>':
x.cc:12:   instantiated from 'S<T>'
x.cc:19:   instantiated from here
x.cc:7: internal compiler error: in dependent_type_p, at cp/pt.c:15553
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

This is a regression introduced in gcc3.4.x.

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org
      Known to fail|4.2.3 4.3.0                 |4.2.3 4.3.0 3.4.6
      Known to work|                            |2.95.3 3.3.6
   Last reconfirmed|2008-01-24 15:52:12         |2008-02-12 08:17:03
               date|                            |


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



More information about the Gcc-bugs mailing list