------- Comment #3 from hjl dot tools at gmail dot com  2009-01-16 19:46 -------
[...@gnu-27 build_base_o3.0000]$ cat y.cc
template<class _T1, class _T2>
struct pair
{
  typedef _T1 first_type;
  typedef _T2 second_type;
  _T1 first;
  _T2 second;
  pair () : first(), second() { }
  pair(const _T1& __a, const _T2& __b)
    : first(__a), second(__b) { }
};

template<class _T1, class _T2>
inline pair<_T1, _T2>
make_pair(_T1 __x, _T2 __y)
{
    return pair<_T1, _T2>(__x, __y);
}

template <int dim> class bar;

template <int dim>
pair<bar<dim> *, unsigned int>
foo (unsigned int position)
{  
      const pair<int,unsigned int> tmp;
      return make_pair (new bar<dim>(tmp.first),
                             position);
 }
[...@gnu-27 build_base_o3.0000]$ /export/gnu/import/rrs/143437/usr/bin/gcc  -O2
y.cc -S
y.cc: In function ‘pair<bar<dim>*, unsigned int> foo(unsigned int)’:
y.cc:27: internal compiler error: tree check: expected field_decl, have
identifier_node in lvalue_p_1, at cp/tree.c:120
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[...@gnu-27 build_base_o3.0000]$ 


-- 


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

Reply via email to