Bug 3349

Summary: another ICE (in convert_for_assignment)
Product: Sisyphus Reporter: Alexey Voinov <voins>
Component: gcc3.2-c++Assignee: Dmitry V. Levin <ldv>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P2    
Version: unstable   
Hardware: all   
OS: Linux   

Description Alexey Voinov 2003-12-07 19:54:28 MSK
$ cat > a.cc
template <typename T> T make_smth(void);

template <typename T1, typename T2> struct struct1
{
typeof(make_smth<T2>()(*make_smth<T1>()))
operator*() {}
};

struct struct2
{
template <typename T> typeof(T::first)
operator()(T t) const { return t.first; }
};

struct data { int first; };
void g(void) { *struct1<data*, struct2>(); }

$ g++ a.cc
a.cc: In member function `__typeof (T::first) struct2::operator()(T) const [with
T = data]':
a.cc:6:   instantiated from `struct1<data*, struct2>'
a.cc:16:   instantiated from here
a.cc:12: Internal compiler error in convert_for_assignment, at cp/typeck.c:6169
Comment 1 Alexey Voinov 2003-12-30 14:39:47 MSK
$ g++-3.3 test.cc
test.cc: In member function `__typeof (T::first) struct2::operator()(T) const
[with T = data]':
test.cc:6:   instantiated from `struct1<data*, struct2>'
test.cc:16:   instantiated from here
test.cc:12: internal compiler error: in convert_for_assignment, at cp/typeck.c:5917
Comment 2 Alexey Voinov 2005-01-11 18:35:20 MSK
fixed in gcc3.4