Bug 3349 - another ICE (in convert_for_assignment)
Summary: another ICE (in convert_for_assignment)
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: gcc3.2-c++ (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: Dmitry V. Levin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-07 19:54 MSK by Alexey Voinov
Modified: 2006-03-26 22:14 MSD (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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